-
Notifications
You must be signed in to change notification settings - Fork 148
Links
Use short descriptive link text that helps provide context for the material that you're linking to.
Tip: Do not use "here" as link text.
For example, follow these examples that link to external URLs:
- The zkApp CLI makes it easy to follow recommended best practices by providing project scaffolding, including dependencies such as o1js, a test framework Jest, code auto-formatting Prettier, linting ES Lint, and more.
You can link to specific headings on the same or different page and link to other doc pages.
Markdown links work in different ways on our docs site. Although you can use a relative path, the preferred syntax is to use the file path after the base docs site URL, which simplifies maintenance.
-
If your doc is not yet published, you can still form links. See How to see your local doc updates during development for steps to build the docs locally so you can test the doc build and see local updates before you push changes to GitHub.
-
Local doc builds resolve to http://localhost:3000/.
For example, a local doc build URL for a specific heading on a page is http://localhost:3000/zkapps/how-zkapps-work#prover-function-and-verification-key.
- To form the link syntax, copy the link link URL after http://localhost:3000/.
-
Select the heading on the docs page to display the direct link in the web browser address bar.
-
Copy the link after https://docs.minaprotocol.com/.
These examples use the shortened internal URL for linking to other doc pages:
-
See how zkApps work, how to write a zkApp, and zkApps for Ethereum Developers Syntax for linking to headings within a doc page:
-
See Install Mina zkApp CLI Syntax for linking to GitHub directories and files:
For links from files in the /docs2 repo to files in the /docs2 repo, you can use the shortened file path after the base docs site URL:
-
Use tree for directories: examples/zkapps/06-offchain-storage/contracts
-
Use blob for files: src/main.ts
README files are an exception to using a shortened file path after the base docs site URL.
Because README files populate the npm package, you must use full, absolute links so that the links work on npm.
For example, the o1js README uses absolute links so that the links on the o1js npm package resolve correctly.