• Stars
    star
    370
  • Rank 115,405 (Top 3 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The source of truth for Polkadot.

Polkadot Wiki

The Source of Truth for Polkadot


GPLv3 license made-with-Markdown PRs Welcome Polkadot Prod Kusama Prod


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.

Contributing to Documentation

The Technical Education team at Web3 Foundation are the primary maintainers of the Wiki and will review all issues and pull requests created in 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.

Running Locally

Both the Polkadot Wiki and the Kusama Guide are built from the source files in this repository. After cloning the source locally, you can start the websites with each of these respective commands (ensure you run yarn at the root of the repository first to install dependencies).

The Wiki uses Algolia search, which can be accessed locally by providing the correct App ID and API key. The app_id and api_key environment variables are needed for the Wiki to be built successfully. If you are an external contributor, set the variables with some values like shown below, which lets the Wiki repo build successfully (but disables the search bar).

export app_id="xxxxxx" api_key="xxxxxxx"

Using yarn, run:

yarn install

Build

🐦 Building the Kusama Guide:

yarn kusama:build

🟣 Building the Polkadot Wiki:

yarn polkadot:build

Start

🐦 Starting the Kusama Guide:

yarn kusama:start

🟣 Starting the Polkadot Wiki:

yarn polkadot:start

Publish

🐦 Publishing the Kusama Guide:

yarn kusama:publish-gh-pages

🟣 Publishing the Polkadot Wiki:

yarn polkadot:publish-gh-pages

Style and Configuration Guide

Use the style guide from the Substrate Knowledge Base

Formatting

Prettier is automatically run when making a local commit. Verify that all changes render as expected after making new commits by running the projects locally.

See the Conditional Rendering and React Components sections for additional details regarding how to properly format syntax for elements outside of the standard markdown library.

Search Engine

Algolia DocSearch is the search engine that is used, which is built into Docusaurus. Indexing via Algolia provides faster lookup; the actual configuration for lookup is located in another repository that Algolia DocSearch maintains.

We have enabled searching on the Wiki by declaring the algolia section in the siteConfig.js file in scripts, and defining an API key and index name that are provided by DocSearch.

  algolia: {
    apiKey: "53c6a4ab0d77c0755375a971c9b7cc3d",
    indexName: "kusama_guide",
    algoliaOptions: {
      facetFilters: ["language:LANGUAGE"],
    }, // Optional, if provided by Algolia
  }

If you would like to access and modify this, you can re-submit the documentation url via DocSearch Program, where they will send a JavaScript snippet that you can re-integrate into the configuration, similar to the one shown above.

Automation

Deployments

The Polkadot Wiki is built on the gh-pages branch and automatically deployed to GitHub Pages. The Kusama Wiki is also deployed to GitHub Pages (via a separate repository).

Development servers exist at https://staging.polkadot.network and https://staging.kusama.network. The servers will reflect the latest master commit or PR put up against the master branch by a member of the Technical Education team. A staging environment can be generated to reflect a specific branch by invoking the workflow_dispatch command via the GitHub UI and can then be reviewed by the team before proceeding to production. If all is well, the new commits on master are transferred into the production branch,prod, by rebasing master on prod. This is completed automatically every 24 hours or manually through a workflow_dispatch command. After these jobs are completed, the CICD production workflow will automatically deploy prod to the public sites: Polkadot Wiki and Kusama Guide, respectively.

GitHub Actions

Job Description Frequency
Audit Images Searches for unreferenced images in the docs repository and archives them into /docs/assets/_legacy. Monthly or Workflow Dispatch
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
Deploy Kusama Prod Deploy Kusama docs to GitHub Pages (production). Daily or Workflow Dispatch
Deploy Kusama Staging Deploy Kusama docs to staging environment. Workflow Dispatch
Deploy Polkadot Prod Deploy Polkadot docs to GitHub Pages (production). Daily or Workflow Dispatch
Deploy Polkadot Staging Deploy Polkadot docs to staging environment. Workflow Dispatch
Generate PDF Generate a PDF for the docs and upload it to the static website. Disabled Manually
Greetings Greet first time contributors. First Time Pull Request or Issue Creation
Jest Testing Coverage Run a series of Jest tests related to React functionality. Weekly or Workflow Dispatch
Pages and Build Deployment Deploy Polkadot docs prod branch from GH Pages to public site. (This was originally setup through the GitHub settings menu, prior to GitHub Actions flows) On Push to gh-pages branch
Prettier All Run prettier over all docs to maintain styling standards. Weekly or Workflow Dispatch
Status Badges Update the commit history of various open source projects in the ecosystem. Weekly or Workflow Dispatch

Conditional Rendering

The two Wikis support conditional rendering depending on which Wiki is being deployed. This is useful for mirrored pages with most content in common but have minor differences. To use this functionality, surround Kusama specific content with {{ kusama: KUSAMA_SPECIFIC_CONTENT :kusama }}, and polkadot specific content with {{ polkadot: POLKADOT_SPECIFIC_CONTENT :polkadot }}.

For example the syntax:

The {{ polkadot: Polkdadot Wiki :polkadot }} {{ kusama: Kusama Guide :kusama }} is a great resource!

Will render:

The Polkdadot Wiki is a great resource!

or

The Kusama Guide is a great resource!

depending on which project is currently loaded.

To verify the appropriate values have been substituted in each scenario, run polkadot:start and kusama:start in separate terminals. If prompted with [WARNING] Something is already running on port 3000. Would you like to run the app on another port instead?, proceed with yes. This will likely launch one project on port 3000 and the other on 3001, allowing you to compare the rendered outputs for both projects locally and simultaneously.

Inline React Components

Occasionally you may require additional functionality that is outside of the scope of basic markdown. React components can be used inline in existing markdown documents as a solution, allowing you to render custom elements. This is currently the strategy used to retrieve live on-chain values and display them directly in the docs without the need to recompile or even reload the web app using RPCs.

If you are looking to invoke and embed data from 3rd party APIs or sources, checkout the Http-Request-Sample component. A full list of sample components can be found here.

Try and reuse existing components as much as possible instead of creating new ones to keep the code lean and comprehensive. It is also important to verify prettier has not modified the formatting of your component after making a commit. Below are some best practices for achieving common formatting that will not be modified by the prettier command:

Always wrap RPC components in conditional rendering & keep them on new lines:

{{ polkadot: <RPC network="polkadot" path="query.staking.validatorCount" defaultValue={297}/> :polkadot }}
{{ kusama: <RPC network="kusama" path="query.staking.validatorCount" defaultValue={297}/> :kusama }}

To add grammar without added spacing, place the grammar inside the conditional brackets:

The validator count followed by a period is
{{ polkadot: <RPC network="polkadot" path="query.staking.validatorCount" defaultValue={297}/>. :polkadot }}
{{ kusama: <RPC network="kusama" path="query.staking.validatorCount" defaultValue={297}/>. :kusama }}

The validator count in parentheses is
{{ polkadot: (<RPC network="polkadot" path="query.staking.validatorCount" defaultValue={297}/>) :polkadot }}
{{ kusama: (<RPC network="kusama" path="query.staking.validatorCount" defaultValue={297}/>) :kusama }}

Failing to follow this schema can results in unexpected formatting, such as added line-breaks or spacing, especially after running prettier.

Internationalization

❗ The Wiki is currently being reorganized and updated. Work will resume on translations after the Wiki revamp is completed.

License

The Polkadot Wiki is licensed under the GPL-3.0 free software license.

More Repositories

1

Grants-Program

Web3 Foundation Grants Program
JavaScript
1,018
star
2

General-Grants-Program

Web3 Foundation General Grants Program
590
star
3

schnorrkel

Schnorr VRFs and signatures on the Ristretto group
Rust
309
star
4

polkadot-validator-setup

Polkadot Validator Secure Setup
JavaScript
215
star
5

polkadot-spec

The Polkadot Protocol Specification
TeX
178
star
6

messaging

Messaging for Web3
TeX
167
star
7

PSPs

Polkadot Smart Contract Proposals
152
star
8

unbounded

Open source, freely available and on-chain funded font.
152
star
9

Grant-Milestone-Delivery

Repository to submit finished milestones
104
star
10

polkadot-deployer

Tool for deploying polkadot networks
JavaScript
101
star
11

research

Overview of W3F research initatives
JavaScript
95
star
12

consensus

Consensus for Web3
TeX
88
star
13

staking-rewards-collector

JavaScript
78
star
14

bls

Aggregatable BLS sigantures
Rust
65
star
15

1k-validators-be

Thousand Validators Program backend.
TypeScript
63
star
16

polkadot-wiki-old

The Polkadot wiki.
HTML
55
star
17

apk-proofs

Rust
50
star
18

polkadot-legacy-spec

A more technical description of Polkadot protocol
47
star
19

ring-vrf

TeX
36
star
20

jamtestvectors

The latest test vectors for JAM.
Python
31
star
21

substrate-telemetry-exporter

JavaScript
30
star
22

polkadot

Rust
30
star
23

hd-ed25519

Hierarchical derivations on Ed25519
Rust
25
star
24

polkadot-charts

Helm charts for deploying Polkadot networks.
Smarty
22
star
25

CardsAgainstBlockchain

Cards Against Blockchain
TeX
22
star
26

mooc-exercises

Exercises for Web3 MOOC
Rust
21
star
27

fflonk

Rust
21
star
28

validator-security

A collaborative document for good practice with validator security
20
star
29

1KC

Thousand Contributors Programme
20
star
30

polkadot-payouts

TypeScript
19
star
31

polkadot-watcher-validator

TypeScript
18
star
32

offences-monitor

Monitors slashable offences registered on a Substrate based chain.
JavaScript
18
star
33

w3f-education

Technical Education at Web3 Foundation
JavaScript
17
star
34

polkadot-registrar-challenger

Polkadot Registrar Service (beta)
Rust
15
star
35

ring-proof

ring-vrf ring proof v2.5
Rust
14
star
36

educhain

Parachain developed and maintained by Tech Ed team
Rust
14
star
37

polkadot-registrar-watcher

TypeScript
13
star
38

polkadot-light-paper

Light Polkadot info
12
star
39

ipfs-cluster-chart

Helm Chart for: https://cluster.ipfs.io/documentation/guides/k8s/
Shell
11
star
40

polkadot-tests

Polkadot Protocol Conformance Tests
Rust
11
star
41

polkadot-lab

Testing framework for Polkadot networks
TypeScript
11
star
42

polkadot-watcher-csv-exporter

polkadot-watcher-csv-exporter
TypeScript
11
star
43

chainspec-generator

CLI for generating the Polkadot and Kusama chain specification from Ethereum state.
TypeScript
11
star
44

faucet-bot

A DOTs-giving bot frontend to the faucet.
JavaScript
10
star
45

parachain-implementers-guide

9
star
46

ark-scale

Arkworks serialization wrapped in Parity SCALE codec
Rust
8
star
47

helm-charts

8
star
48

substrate-legacy

Rust
8
star
49

xcmp_prototype_playground

Prototyping several xcmp approaches
Rust
8
star
50

matrixbot

ChatBot for infrastructure interactions
Python
8
star
51

substrate-telemetry-chart

Smarty
7
star
52

polkadot-api-client-ts

TypeScript
7
star
53

polkadot-watcher-transaction

TypeScript
7
star
54

polkadot-dashboard

6
star
55

matrix-server-charts

Shell
6
star
56

injection-tool

Tools, scripts and utilities for making injections.
TypeScript
6
star
57

substrate-benchmarks-role

Ansible role for substrate runtime module benchmarking
Python
6
star
58

algorithmacs

Algorithmic style for Texmacs
TypeScript
6
star
59

ethereum-tracker

JavaScript
6
star
60

polkadot-docs

Polkadot Developer Documentation
6
star
61

validator-selection-tool

TypeScript
6
star
62

polkadot-claims

Claim a DOT allocation to a Polkadot public key.
Solidity
6
star
63

KTFPs

Kusama Treasury Funding Proposals
6
star
64

terraform-digitalocean-polkadot-deployer

Go
5
star
65

polkadot-react-icons

TypeScript
5
star
66

PPPs

Polkadot Protocol Proposals
TypeScript
5
star
67

terraform-ts

TypeScript
4
star
68

test-utils-ts

TypeScript
4
star
69

matrix-recorder-chart

HTML
4
star
70

helm-ts

TypeScript
4
star
71

substrate-alertrules-chart

Shell
4
star
72

polkadot-account-monitoring

Rust
4
star
73

kusama-guide-staging

staging server for kusama guide
HTML
4
star
74

components-ts

TypeScript
4
star
75

kusama-guide-hosting

Repository to deploy the Kusama Guide for hosting on GitHub Pages.
HTML
4
star
76

ethberlin4

Solidity
4
star
77

terraform-google-polkadot-lab

Creates the infrastructure for running polkadot network tests
HCL
3
star
78

polkadot-wiki-staging

polkadot wiki dev server build branch (github pages deployment)
JavaScript
3
star
79

edgeware-deployment

Dockerfile
3
star
80

cloudflare-ts

TypeScript
3
star
81

web3

3
star
82

terratest-polkadot-deployer

Go
3
star
83

polkadot-checker

JavaScript
3
star
84

terraform-google-polkadot-deployer

Go
3
star
85

teleport-role

HTML
3
star
86

terraform-azure-polkadot-deployer

HCL
3
star
87

node-docker

Dockerfile
3
star
88

NPoS-Economics

Jupyter Notebook
3
star
89

node-exporter-dashboard

3
star
90

polkadot-validator-ansible

Python
3
star
91

harvester-chart

Smarty
3
star
92

uptime-probe

Rust
3
star
93

1k-validators-candidate-verification

Rust
3
star
94

ghost-staging

Shell
3
star
95

disc2020-scalability-and-interoperability-workshop

HTML
3
star
96

algebraic-torus

A library to facilitate comptutation with algebraic torus
Sage
3
star
97

hs-p4p

p2p networking library in Haskell
Haskell
3
star
98

terraform-aws-polkadot-deployer

HCL
3
star
99

1k-watcher-claimed-payouts

A tool for generating reports about reward claims of all the 1k Validator Programme candidates.
Rust
3
star
100

crypto-ts

TypeScript
3
star