Giter VIP home page Giter VIP logo

polkadot-wiki's Introduction

CircleCI

Polkadot Wiki

The Polkadot Wiki is the central source of truth for Polkadot. It is a community-focused initiative led by the Web3 Foundation to keep an up-to-date resource on the best information for building on Polkadot, learning about Polkadot, or maintaining a node on Polkadot.

Contributing to Documentation

The Wiki is a community-focused initiative and we will review all pull-requests and issues created in this repository. If you notice typos or grammatical errors, please feel free to directly create pull requests with these corrections. 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.

Style Guide

Use the style guide from the Substrate Knowledge Base

Formatting

Use Prettier to format markdown pages. To run Prettier on the docs folder, run:

npx prettier --write ./docs/

Automated Deployments

The wiki is automatically deployed to GitHub Pages via the CircleCI job on each new commit to the master branch.

Dynamic Value Inserts

This documentation sometimes makes references to on-chain values that may change over time. For example, it might reference the current number of validators. A custom script exists to populate these values post-build. To avoid conflicts in source files, the replacement is done on built files, not the MD files. The value placeholders are defined in website/inject-dict.json. The placeholders should be included in text surrounded by double curly braces, like so: {{ num_validators }}.

To use the replace script:

cd website
node inject.js

This will read the dictionary and do the replacements.

It is recommended to use the dry run option when adding new values and templates in, to make sure they resolve to values first and don't throw query errors. To use dry run (no replace, just output of templates and their resolved potential replacements), use the --dry or -d flag:

node inject.js --dry

The script defaults to the websocket URL wss://kusama-rpc.polkadot.io/. To change to another URL or to connect to a local node, use the --node/-n flag:

node inject.js -n ws:localhost:9944

Note: make sure you're running an archive node if you're querying into the past!

See other available options by using the help command.

node inject.js help

Mirror pages

A limitation of Docusaurus is that pages can only be included in one sidebar at any given time. Thus, our Kusama section will either hijack some content it shares with the rest of the wiki, or lack that content.

To solve this, the repo mirrors some pages and includes them in additional sidebars. The website folder contains a mirror.js script that creates a copy of the pages to duplicate across sidebars. The new pages are prefixed with mirror, and first need to be declared in mirror.js and added to the relevant sidebar section. To run the script:

node mirror.js

Internationalization

We are using Crowdin to manage all different translations. You can go to the project page and select the language you would like to translate to start.
All translated content through Crowdin will regularly submit a pull request to this repository.

If you do not see the language you would like to translate, please let us know via Riot.

License

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

polkadot-wiki's People

Contributors

ansonla3 avatar bustanit avatar dependabot-preview[bot] avatar drewstone avatar edwardathomson avatar fgimenez avatar joepetrowski avatar jtochamberlain avatar laboon avatar lamafab avatar lsaether avatar mariopino avatar migueldingli1997 avatar noc2 avatar pavel-lens avatar pkrasam avatar subsocialdev avatar swader avatar w3fbot avatar web3foundation avatar wpank avatar xz-cn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.