Online Docs of NKN
This documentations is the English version of documents of NKN. You can read it at NKN Docs.
Get Started
Fork repository
fork nknorg/documentations to your own github account.
Clone repository
$ git clone https://github.com/<YOUR NAME>/documentations.gitInstall dependencies
$ cd website
$ yarn installtesting in localhost
$ cd website
$ yarn run startcommit your code
$ git add --all
$ git commit -s
$ git push origin masterpull request
create a pull request to remote repository.
Directory Structure
Your project file structure should look something like this
documentations/
docs/
home.md
get-start.md
jsonrpc-api-reference.md
website/
core/
node_modules/
pages/
static/
css/
img/
package.json
sidebar.json
siteConfig.js
Editing Content
Editing an existing docs page
Edit docs by navigating to docs/ and editing the corresponding document:
docs/jsonrpc-api-reference.md
---
id: jsonrpc-api-reference
title: JsonRPC API Reference
---Adding Content
Adding a new docs page to an existing sidebar
- Create the doc as a new markdown file in
/docs, exampledocs/jsonrpc-api-reference.md:
---
id: jsonrpc-api-reference
title: JsonRPC API Reference
---- Refer to that doc's ID in an existing sidebar in
website/sidebar.json:
// Add newly-created-doc to the API Reference category of docs
{
"docs": {
"API Reference": [
"quick-start",
"jsonrpc-api-reference" // new doc here
],
...
},
...
}Adding items to your site's top navigation bar
- Add links to docs, custom pages or external links by editing the headerLinks field of
website/siteConfig.js:
website/siteConfig.js
{
headerLinks: [
...
/* you can add docs */
{ doc: 'my-examples', label: 'Examples' },
/* you can add custom pages */
{ page: 'help', label: 'Help' },
/* you can add external links */
{ href: 'https://nkn.org', label: 'NKN' },
...
],
...
}