We encourage community contributions to our documentation. Help us improve!
If you see something in these pages that is incorrect or outdated, or if there is a section that’s missing that you would like to author, our goal is to empower you to help make these changes and additions.
This section will show you how to make changes to this documentation.
If you have experience with editing documentation stored in a repo on GitHub, the Quick setup (below) will probably be sufficient. For everyone else, please read the full Contributors Guide.
If you do have a basic familiarity around using command line tools and GitHub,
then the process can be summarized down to the following steps.
This page will go into detail on how to contribute to the Pocket Network documentation site at https://docs.pokt.network. If you are familiar with Markdown and contributing to an open-source repo on GitHub, the Quick setup section may be all you need.
There are only 2 tools needed to get started contributing to the documentation:
For this guide, we’ll cover the easiest way to install Hugo, which is
downloading an already built executable. If you would prefer to install from a
package manager like brew, chocolately, or apt, then you should follow
along with the corresponding Hugo installation guide.
Close your Terminal. When you reopen your Terminal, Hugo will be ready to
Using Package Managers
Alternatively, if you have Homebrew installed, you can also run the following:
brew install hugo
Or if you have have MacPorts installed, you can run the following:
port install hugo
If you’re on Linux/OpenBSD, it’s highly recommended you use a package manager install since Hugo does not require a new installation like in Windows and Mac.
snap install hugo
sudo pacman -Syu hugo
sudo dnf install hugo
sudo zypper install hugo
doas pkg_add hugo
Download and install the corresponding Git for Windows setup for your system, either 32- or 64-bit.
From a terminal, run:
If it’s not installed, you’ll be prompted with an installer.
sudo apt install git
sudo pacman -Syu git
Fedora, Red Hat, CentOS
sudo dnf install git
sudo zypper install git
doas pkg_add git
While Hugo and Git are everything you need to get up and running, we recommend setting up an environment that will take care of content editing, managing Git changes, and running the Hugo commands all in one place.
If you already have a text editor of choice such as vim, emacs, or SublimeText, check out the Editor plugins for Hugo page. This will show how to integrate Hugo with your familiar environment.
If you don’t have a text editor of choice, we recommend installing Visual Studio Code. It comes built with the tools we need to work with Hugo and Git without having to resort to a command line.
Once you have Visual Studio Code installed, launch it and install the following plugins:
Saving any file will cause the page to be automatically updated in the browser.
Editing existing pages
To edit an existing page, you can open a Markdown file in a text editor, make any textual changes you’d like, and save the file. If you are running a local server, you will be able to immediately see the changes as they will appear.
Adding pages to existing sections
If you want to add content, simply create a new markdown file in the content directory in the directory you want the content to live in.
Once created, each file needs a front matter (header), which can be either yaml, toml, or json specifying the following 3 things: title, menuTitle, weight.
The following shows an example of the front matter for a Glossary page:
The title represents what the page will be referred to as in the browser tab, as well as in link tooltips, and possibly in external cards that are displayed in tweets and in message previews.
The menuTitle represents what the page will be called in the navigation sidebar.
The weight determines the order in which pages in that same section level will be ordered. If we wanted a page to come before this in the tree, we would need to give it a weight smaller than 10, and if we wanted a page to come after this in the tree, we would need to give it a weight larger than 10.
After the front matter, the rest of the content in the page can be created in Markdown, as well as a handful of “shortcodes” that can be used to embed slightly more sophisticated elements easily.
This should make sense, as the weights to buy.md, stake.md and wallets.md are 20, 30, and 10, respectively.
Adding new sections
Sections are defined by directories with an _index.md file in them. The site also has an _index.md file that serves as the home page in the root of content/. As mentioned above, sections are ordered by their weights relative to other pages in their section. Sections are ordered against each other by the weight listed in the corresponding _index.md.
To add a new section, create a new directory under content/ and add an _index.md file. You can also add any additional markdown files in that directory, as described above.