- Contributing to Documentation
- Running Locally
- Style and Configuration Guide
- Internationalization
- License
The Polkadot Wiki is the central source of truth for Polkadot. It is a community-focused initiative led by Web3 Foundation to keep an up-to-date resource on the best information for learning, building, or maintaining on Polkadot.
The Technical Education team at Web3 Foundation are the primary maintainers of the Wiki and will review all issues and pull requests created on this repository. If you notice typos or grammatical errors, please feel free to create pull requests with these corrections directly. Larger contributions may start as issues to test the waters on the subject with the maintainers. It is generally preferable to create a pull request over an issue to propose a change to the Wiki content.
✨ The Wiki belongs to the community, help generate its identity. ✨
identity.mp4
📥 There will be an upcoming initiative that will promote and encourage contributions towards Polkadot-based content and documentation. In the meantime, feel free to share any ideas or feedback you may have for the Wiki by opening a Feature Request issue.
Keep engaged by checking out these common Polkadot ecosystem resources.
- Make sure
python
(Python 3.12) andpip
are installed and in your path - It's recommended to use a virtual environment, as is common practice
- Enter a virtual environment:
# Create the env
python -m venv venv
# Enter the env
source venv/bin/activate
- Install dependencies (make sure you're in the project's directory)
pip install -r requirements.txt
- Once installed, run the serve command:
# If you're in a virtual env (set to false if you're not editing RPC commands, otherwise it will take time to load)
ENABLE_RPC=false mkdocs serve
# If you're not in a virtual env
python -m mkdocs build
🟣 Building the Polkadot Wiki:
# If you're in a virtual env (set to false if you're not editing RPC commands, otherwise it will take time to load)
ENABLE_RPC=false mkdocs build
# If you're not in a virtual env
python -m mkdocs build
Use the style guide from the Substrate Knowledge Base
See the Conditional Rendering and Mkdocs Macros sections for additional details regarding how to properly format syntax for elements outside of the standard markdown library.
The Polkadot Wiki is built in a CI job, where it is then deployed on Netlify. Each commit to master triggers a new build and subsequent deployment.
Pull request previews are enabled, meaning a temporary deployment via Netlify is generated per PR.
After these jobs are completed, the CICD production workflow will automatically deploy
prod
to the public site: Polkadot Wiki.
Job | Description | Frequency |
---|---|---|
Audit Links | Test all links in the docs for broken references and opens a new issue displaying results if any are found. | Monthly or Workflow Dispatch |
Code QL Analysis | Tests for vulnerabilities across the codebase | Weekly, Push to master or Pull Request to master |
Dependabot | Helps keep packages up-to-date with latest release. | Daily |
Build and Deploy to Netlify | Builds and deploys the site to Netlify. If it is a PR, it generates a preview. If it is a push to master, it will deploy on the production URL. | |
Status Badges | Update the commit history of various open source projects in the ecosystem. | Weekly or Workflow Dispatch |
The Polkadot Wiki does not support conditional rendering. If needed, represent multiple chains (i.e, Polkadot and Kusama) using the tab layout specified here on the Mkdocs Material documentation.
Mkdocs macros allow the use of Jinja2 templates and custom Python functions to allow for custom data fetching and rendering within Mkdocs. All current macros can be found in: macros/
.
For example, the rpc
macro can be used in the following manner, with each field representing the input for the function signature respectively.
rpc
macro function signature:
def rpc(network, module, call, default_value, is_constant=False, readable="")
- Example Usage:
## Number of Nominators
{{ rpc("polkadot", "Staking", "CounterForNominators", 36793, is_constant=false) }}
- Different types of readable, depending on usage and network:
- Percentage
- Human Readable / Human Readable Kusama (rounds to nearest 100)
- Blocks to days (converts blocks to days)
- Precise DOT / KSM (returns an unrounded number with full precision)
❗ The Wiki is currently being reorganized and updated. Work will resume on translations after the Wiki revamp is completed. |
---|
The Polkadot Wiki is licensed under the GPL-3.0 free software license.