Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation improvements (typos, links, images) #731

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/nextra/pages/en/build/guides.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Choose one of the following guides to learn how to use Aptos for your use cases!
</Card>
<Card href="guides/your-first-nft">
<Card.Title>Your First NFT</Card.Title>
<Card.Description>Learn the Aptos Ttoken interface and how to use it to generate your first NFT.</Card.Description>
<Card.Description>Learn the Aptos Token interface and how to use it to generate your first NFT.</Card.Description>
</Card>
<Card href="guides/first-fungible-asset">
<Card.Title>Your First Fungible Asset</Card.Title>
Expand Down
16 changes: 5 additions & 11 deletions apps/nextra/pages/en/build/sdks/ts-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,27 @@ import { RemoteCodeblock, permalinkFetch, Cards, Card } from '@components/index'

export async function getStaticProps() {
return await permalinkFetch([
'https://github.com/aptos-labs/aptos-ts-sdk/blob/bcde1e3af2f09615015c774fb0c2f5206377346e/examples/typescript/simple_transfer.ts#L77-L91'
<a href="https://github.com/aptos-labs/aptos-ts-sdk/blob/bcde1e3af2f09615015c774fb0c2f5206377346e/examples/typescript/simple_transfer.ts#L77-L91">simple_transfer</a>
])
}

# TypeScript SDK

<div className="flex gap-2 mt-6 flex-wrap">
<a target="_blank" href="https://github.com/aptos-labs/aptos-ts-sdk">
![Github Repo Stars](https://img.shields.io/github/stars/aptos-labs/aptos-ts-sdk)
<img src="https://img.shields.io/github/stars/aptos-labs/aptos-ts-sdk" alt="Github Repo Stars" />
</a>
<a target="_blank" href="https://www.npmjs.com/package/@aptos-labs/ts-sdk">
![NPM Version](https://img.shields.io/npm/v/%40aptos-labs%2Fts-sdk)
<img src="https://img.shields.io/npm/v/%40aptos-labs%2Fts-sdk" alt="NPM Version" />
</a>
{/* Revisit later if we need these */}
{/* <a target="_blank" href="https://www.npmjs.com/package/@aptos-labs/ts-sdk">
![Node Version](https://img.shields.io/node/v/%40aptos-labs%2Fts-sdk)
</a> */}
{/* <a target="_blank" href="https://www.npmjs.com/package/@aptos-labs/ts-sdk">
![NPM bundle size](https://img.shields.io/bundlephobia/min/%40aptos-labs/ts-sdk)
</a> */}
<a target="_blank" href="https://aptos-labs.github.io/aptos-ts-sdk/@aptos-labs/ts-sdk-latest">
![Static Badge](https://img.shields.io/badge/SDK_Reference-Docs)
<img src="https://img.shields.io/badge/SDK_Reference-Docs" alt="SDK Reference" />
</a>
Comment on lines 16 to 24
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, these seem to work right now, any reason to change from markdown to HTML?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MDX format is specifically designed to combine the simplicity of Markdown with the power of HTML where needed. In this case, using HTML tags in MDX is a valid and more suitable solution for creating interactive badges
Screenshot before changes:
image
Screenshot after changes:
image
The HTML version provides:

  • Proper handling of external links with target="_blank"
  • Better visual presentation of badges

</div>

The TypeScript SDK allows you to connect, explore, and interact on the Aptos blockchain. You can use it to request data, send transactions, set up test environments, and more!


```bash npm2yarn
npm i @aptos-labs/ts-sdk
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,3 @@ Copy all of these and replace the existing files in `public/favicon`
### Customizing Open Graph

To customize the Open Graph configuration, see `theme.config.tsx`.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "Node Networks and Sync"

Validator nodes and fullnodes form a hierarchical structure with validator nodes at the root and fullnodes everywhere else. The Aptos blockchain distinguishes two types of fullnodes: validator fullnodes and public fullnodes. Validator fullnodes connect directly to validator nodes and offer scalability alongside DDoS mitigation. Public fullnodes connect to validator fullnodes (or other public fullnodes) to gain low-latency access to the Aptos network.

![v-fn-network.svg](/docs/v-fn-network.svg)
![v-fn-network.svg](/apps/nextra/public/docs/v-fn-network.svg)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is currently working? I think it should stay how it is

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the image with the original path isn't working - it shows as a broken image. The new path I added points to the correct location of the file in the project structure (/apps/nextra/public/docs/v-fn-network.svg), which makes the image display properly.

Would you like me to show you the difference between how it looks with both paths?
Screenshot before changes:
image
Screenshot after changes:
image


## Node types

Expand Down
2 changes: 1 addition & 1 deletion apps/nextra/pages/en/network/blockchain/resources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ On Aptos, on-chain state is organized into resources and modules. These are then

## Resources vs Instances

Move modules define struct definitions. Struct definitions may include the abilities such as `key` or `store`. Resources are struct instance with The `key` ability that are stored in global storage or directly in an account. The `store` ability allows struct instances to be stored within resources. An example here is how the APT coin is stored: CoinStore is the resource that contains the APT coin, while the Coin itself is an instance:
Move modules define struct definitions. Struct definitions may include the abilities such as `key` or `store`. Resources are struct instances with the `key` ability that are stored in global storage or directly in an account. The `store` ability allows struct instances to be stored within resources. An example here is how the APT coin is stored: CoinStore is the resource that contains the APT coin, while the Coin itself is an instance:

```move
/// A holder of a specific coin type and associated event handles.
Expand Down
Loading