Skip to content

Commit

Permalink
Add autogenerated sidebar categories (MetaMask#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandratran authored May 16, 2023
1 parent 22e1d84 commit ff971bb
Show file tree
Hide file tree
Showing 60 changed files with 98 additions and 141 deletions.
39 changes: 5 additions & 34 deletions snaps-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,60 +22,31 @@ const sidebar = {
label: "Get started",
link: { type: "generated-index" },
collapsed: false,
items: [
"get-started/install-snaps",
"get-started/quickstart",
],
items: [{ type: "autogenerated", dirName: "get-started" }],
},
{
type: "category",
label: "How to",
link: { type: "generated-index" },
items: [
"how-to/develop-a-snap",
"how-to/request-permissions",
"how-to/manage-keys",
"how-to/use-custom-ui",
"how-to/troubleshoot",
],
items: [{ type: "autogenerated", dirName: "how-to" }],
},
{
type: "category",
label: "Concepts",
link: { type: "generated-index" },
items: [
"concepts/anatomy",
"concepts/lifecycle",
"concepts/user-interface",
"concepts/execution-environment",
"concepts/design-guidelines",
],
items: [{ type: "autogenerated", dirName: "concepts" }],
},
{
type: "category",
label: "Tutorials",
link: { type: "generated-index" },
items: ["tutorials/gas-estimation", "tutorials/transaction-insights"],
items: [{ type: "autogenerated", dirName: "tutorials" }],
},
{
type: "category",
label: "Reference",
link: { type: "generated-index" },
items: [
"reference/rpc-api",
"reference/exports",
{
type: "category",
label: "Snaps CLI",
collapsed: true,
link: {
type: "doc",
id: "reference/cli/index",
},
items: ["reference/cli/options", "reference/cli/subcommands"],
},
"reference/permissions",
],
items: [{ type: "autogenerated", dirName: "reference" }],
},
],
};
Expand Down
2 changes: 1 addition & 1 deletion snaps/concepts/anatomy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Snaps anatomy
description: Learn about the anatomy of a snap project.
sidebar_position: 1
---

# Snaps anatomy
Expand Down
6 changes: 3 additions & 3 deletions snaps/concepts/design-guidelines.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Snaps design guidelines
description: Guiding principles for designers, developers, builders, and writers to create snap install flows that are accessible for all types of users.
description: Learn about best practices for creating snap installation flows.
sidebar_position: 5
---

# Snaps design guidelines

This page outlines guiding principles for designers, developers, builders, and writers to create snap install flows that are accessible for all users. Use these guidelines when introducing your snap within a dapp or website.
This page outlines guiding principles for designers, developers, builders, and writers to create snap installation flows that are accessible for all users. Use these guidelines when introducing your snap within a dapp or website.

## Why this matters

Expand Down
2 changes: 1 addition & 1 deletion snaps/concepts/execution-environment.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Snaps execution environment
description: Learn about the Snaps execution environment.
sidebar_position: 4
---

# Snaps execution environment
Expand Down
2 changes: 1 addition & 1 deletion snaps/concepts/lifecycle.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Snaps lifecycle
description: Learn about the lifecycle of a snap.
sidebar_position: 2
---

# Snaps lifecycle
Expand Down
2 changes: 1 addition & 1 deletion snaps/concepts/user-interface.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Snaps user interface
description: Learn about the user interface of a snap.
sidebar_position: 3
---

# Snaps user interface
Expand Down
1 change: 1 addition & 0 deletions snaps/get-started/install-snaps.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Install Snaps dependencies.
sidebar_position: 1
---

# Install Snaps
Expand Down
1 change: 1 addition & 0 deletions snaps/get-started/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Get started quickly using the Snaps template.
sidebar_position: 2
---

# Snaps quickstart
Expand Down
1 change: 1 addition & 0 deletions snaps/how-to/develop-a-snap.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Develop, test, and publish a snap.
sidebar_position: 1
---

# Develop a snap
Expand Down
1 change: 1 addition & 0 deletions snaps/how-to/manage-keys.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Manage users' private keys.
sidebar_position: 3
---

# Manage keys
Expand Down
1 change: 1 addition & 0 deletions snaps/how-to/request-permissions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Request permissions in a manifest file.
sidebar_position: 2
---

# Request permissions
Expand Down
1 change: 1 addition & 0 deletions snaps/how-to/troubleshoot.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Solve common issues.
sidebar_position: 5
---

# Troubleshoot
Expand Down
1 change: 1 addition & 0 deletions snaps/how-to/use-custom-ui.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Use a custom user interface.
sidebar_position: 4
---

# Use custom UI
Expand Down
1 change: 1 addition & 0 deletions snaps/reference/cli/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Snaps CLI subcommands and options reference
sidebar_position: 3
---

# Snaps command line interface
Expand Down
3 changes: 2 additions & 1 deletion snaps/reference/cli/options.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Options
sidebar_label: Options
sidebar_position: 1
---

import Tabs from '@theme/Tabs';
Expand Down
3 changes: 2 additions & 1 deletion snaps/reference/cli/subcommands.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Subcommands
sidebar_label: Subcommands
sidebar_position: 2
---

import Tabs from '@theme/Tabs';
Expand Down
1 change: 1 addition & 0 deletions snaps/reference/exports.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
description: Snaps exports reference
toc_max_heading_level: 2
sidebar_position: 2
---

# Snaps exports
Expand Down
1 change: 1 addition & 0 deletions snaps/reference/permissions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Snaps permissions reference
sidebar_position: 4
---

# Snaps permissions
Expand Down
1 change: 1 addition & 0 deletions snaps/reference/rpc-api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Snaps JSON-RPC API reference
sidebar_position: 1
---

# Snaps JSON-RPC API
Expand Down
1 change: 1 addition & 0 deletions snaps/tutorials/gas-estimation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Create a snap that estimates gas fees.
sidebar_position: 1
---

# Create a gas estimation snap
Expand Down
1 change: 1 addition & 0 deletions snaps/tutorials/transaction-insights.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Create a snap that provides transaction insights.
sidebar_position: 2
---

# Create a transaction insights snap
Expand Down
89 changes: 5 additions & 84 deletions wallet-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,110 +9,31 @@ const sidebar = {
label: "Get started",
link: { type: "generated-index" },
collapsed: false,
items: [
"get-started/set-up-dev-environment",
"get-started/run-development-network",
"get-started/detect-metamask",
"get-started/detect-network",
"get-started/access-accounts",
],
items: [{ type: "autogenerated", dirName: "get-started" }],
},
{
type: "category",
label: "How to",
link: { type: "generated-index" },
items: [
{
type: "category",
label: "Use MetaMask SDK",
link: {
type: "doc",
id: "how-to/use-sdk/index",
},
items: [
{
type: "category",
label: "JavaScript",
link: {
type: "doc",
id: "how-to/use-sdk/javascript/index",
},
items: [
"how-to/use-sdk/javascript/react",
"how-to/use-sdk/javascript/pure-js",
"how-to/use-sdk/javascript/other-web-frameworks",
"how-to/use-sdk/javascript/react-native",
"how-to/use-sdk/javascript/nodejs",
"how-to/use-sdk/javascript/electron",
],
},
{
type: "category",
label: "Mobile",
link: {
type: "doc",
id: "how-to/use-sdk/mobile/index",
},
items: [
"how-to/use-sdk/mobile/ios",
"how-to/use-sdk/mobile/android",
],
},
{
type: "category",
label: "Gaming",
link: {
type: "doc",
id: "how-to/use-sdk/gaming/index",
},
items: [
"how-to/use-sdk/gaming/unity",
"how-to/use-sdk/gaming/unreal-engine",
],
},
],
},
"how-to/use-mobile",
"how-to/interact-with-smart-contracts",
"how-to/send-transactions",
"how-to/sign-data",
"how-to/register-token",
"how-to/register-method-names",
"how-to/access-provider",
"how-to/secure-dapp",
"how-to/set-icon",
"how-to/use-onboarding-library",
"how-to/migrate-api",
],
items: [{ type: "autogenerated", dirName: "how-to" }],
},
{
type: "category",
label: "Concepts",
link: { type: "generated-index" },
items: [
"concepts/sdk-connections",
"concepts/signing-methods",
"concepts/convenience-libraries",
],
items: [{ type: "autogenerated", dirName: "concepts" }],
},
{
type: "category",
label: "Tutorials",
link: { type: "generated-index" },
items: [
"tutorials/react-dapp-local-state",
"tutorials/react-dapp-global-state",
],
items: [{ type: "autogenerated", dirName: "tutorials" }],
},
{
type: "category",
label: "Reference",
link: { type: "generated-index" },
items: [
"reference/provider-api",
"reference/rpc-api",
"reference/sdk-js-options",
],
items: [{ type: "autogenerated", dirName: "reference" }],
},
],
};
Expand Down
1 change: 1 addition & 0 deletions wallet/concepts/convenience-libraries.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Learn about convenience libraries.
sidebar_position: 3
---

# Convenience libraries
Expand Down
1 change: 1 addition & 0 deletions wallet/concepts/sdk-connections.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Learn about MetaMask SDK connections.
sidebar_position: 1
---

# MetaMask SDK connections
Expand Down
4 changes: 2 additions & 2 deletions wallet/concepts/signing-methods.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Signing methods
description: A brief history of the signing RPC methods.
sidebar_position: 2
---

# History of the signing methods
# Signing methods

This page describes a brief history of the signing RPC methods in MetaMask.
Learn how to [use the recommended signing methods](../how-to/sign-data.md).
Expand Down
1 change: 1 addition & 0 deletions wallet/get-started/access-accounts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Access a user's accounts and handle changed accounts.
sidebar_position: 5
---

# Access a user's accounts
Expand Down
1 change: 1 addition & 0 deletions wallet/get-started/detect-metamask.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Detect the MetaMask Ethereum provider object.
sidebar_position: 3
---

# Detect MetaMask
Expand Down
1 change: 1 addition & 0 deletions wallet/get-started/detect-network.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Detect a user's network and network changes.
sidebar_position: 4
---

# Detect a user's network
Expand Down
1 change: 1 addition & 0 deletions wallet/get-started/run-development-network.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Configure and connect a Ganache development network.
sidebar_position: 2
---

# Run a development network
Expand Down
1 change: 1 addition & 0 deletions wallet/get-started/set-up-dev-environment.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Set up a new simple dapp to integrate with MetaMask.
sidebar_position: 1
---

# Set up your development environment
Expand Down
Loading

0 comments on commit ff971bb

Please sign in to comment.