diff --git a/CHANGELOG.md b/CHANGELOG.md index 0020e1909..3d657f5e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Utilities documentation (#825) -- Usage docs (#823) - Documentation for SRC5 migration (#821) +- Usage docs (#823) +- Utilities documentation (#825) - Documentation for presets (#832) ### Changed - Use ComponentState in tests (#836) +- Docsite navbar (#838) diff --git a/docs/antora.yml b/docs/antora.yml index 3a76750c6..9aa50d9e2 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -5,4 +5,4 @@ nav: - modules/ROOT/nav.adoc asciidoc: attributes: - page-sidebar-collapse-default: true + page-sidebar-collapse-default: 'Access Control,Accounts,Introspection,Security,ERC20,ERC721,Upgrades' diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 0911c34f8..e8d57eb5d 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -1,36 +1,40 @@ * xref:index.adoc[Overview] -//* xref:wizard.adoc[Wizard] -* xref:usage.adoc[Usage] -* xref:interfaces.adoc[Interfaces and Dispatchers] -* xref:upgrades.adoc[Upgrades] -** xref:/api/upgrades.adoc[API Reference] +* xref:wizard.adoc[Wizard] -* xref:accounts.adoc[Accounts] -** xref:/guides/deployment.adoc[Counterfactual deployments] -** xref:/api/account.adoc[API Reference] +* Learn -* xref:access.adoc[Access Control] -** xref:/api/access.adoc[API Reference] +** xref:components.adoc[Components] +** xref:presets.adoc[Presets] +** xref:interfaces.adoc[Interfaces and Dispatchers] +** xref:guides/deployment.adoc[Counterfactual deployments] +// ** xref:udc.adoc[Universal Deployer Contract] -* Tokens -** xref:erc20.adoc[ERC20] -*** xref:/guides/erc20-supply.adoc[Creating Supply] -*** xref:/api/erc20.adoc[API Reference] +* Modules -** xref:erc721.adoc[ERC721] -*** xref:/api/erc721.adoc[API Reference] -// ** xref:erc1155.adoc[ERC1155] +** xref:access.adoc[Access Control] +*** xref:/api/access.adoc[API Reference] -* xref:security.adoc[Security] -** xref:/api/security.adoc[API Reference] +** xref:accounts.adoc[Accounts] +*** xref:/api/account.adoc[API Reference] -* xref:introspection.adoc[Introspection] -** xref:/guides/src5-migration.adoc[Migrating ERC165 to SRC5] -** xref:/api/introspection.adoc[API Reference] +** xref:introspection.adoc[Introspection] +*** xref:/guides/src5-migration.adoc[Migrating ERC165 to SRC5] +*** xref:/api/introspection.adoc[API Reference] -// * xref:udc.adoc[Universal Deployer Contract] -* xref:utilities.adoc[Utilities] +** xref:security.adoc[Security] +*** xref:/api/security.adoc[API Reference] -* xref:/presets.adoc[Presets] +** Tokens +*** xref:erc20.adoc[ERC20] +**** xref:/guides/erc20-supply.adoc[Creating Supply] +**** xref:/api/erc20.adoc[API Reference] +*** xref:erc721.adoc[ERC721] +**** xref:/api/erc721.adoc[API Reference] +// *** xref:erc1155.adoc[ERC1155] + +** xref:upgrades.adoc[Upgrades] +*** xref:/api/upgrades.adoc[API Reference] + +** xref:utilities.adoc[Utilities] * xref:contracts::index.adoc[Contracts for Solidity] diff --git a/docs/modules/ROOT/pages/usage.adoc b/docs/modules/ROOT/pages/components.adoc similarity index 98% rename from docs/modules/ROOT/pages/usage.adoc rename to docs/modules/ROOT/pages/components.adoc index 2f8c3dc72..7f47f2be1 100644 --- a/docs/modules/ROOT/pages/usage.adoc +++ b/docs/modules/ROOT/pages/components.adoc @@ -1,9 +1,7 @@ -= Usage += Components The following documentation provides reasoning and examples on how to use Contracts for Cairo components. -== Components - :shamans-post: https://community.starknet.io/t/cairo-components/101136#components-1[Starknet Shamans post] :cairo-book: https://book.cairo-lang.org/ch99-01-05-00-components.html[Cairo book] @@ -18,7 +16,7 @@ TIP: For more information on the construction and design of Starknet components, === Setup :initializable-component: xref:/security.adoc#initializable[InitializableComponent] -:accessing-storage: xref:/usage.adoc#accessing_component_storage[Accessing component storage] +:accessing-storage: xref:accessing_component_storage[Accessing component storage] The contract should first import the component and declare it with the `component!` macro: @@ -249,7 +247,7 @@ mod MyContract { == Customization -:security: xref:/usage.adoc#security[Security] +:security: xref:security[Security] WARNING: Customizing implementations and accessing component storage can potentially corrupt the state, bypass security checks, and undermine the component logic. *Exercise extreme caution*. See {security}. diff --git a/docs/modules/ROOT/pages/wizard.adoc b/docs/modules/ROOT/pages/wizard.adoc index e1bdb4c54..d086e7ac2 100644 --- a/docs/modules/ROOT/pages/wizard.adoc +++ b/docs/modules/ROOT/pages/wizard.adoc @@ -5,7 +5,7 @@ Not sure where to start? Use the interactive generator below to bootstrap your contract and learn about the components offered in OpenZeppelin Cairo Contracts. -NOTE: We strongly recommend checking the xref:extensibility.adoc[Extensibility Pattern] to understand how to extend from our library. +NOTE: We strongly recommend checking the xref:components.adoc[Components] section to understand how to extend from our library. ++++