w3f / polkadot-spec-website

Creative Commons Attribution Share Alike 4.0 International
1 stars 3 forks source link

Polkadot Spec Website

This repository contains the source code for the Polkadot specification website.

Specifically, all the Docusaurus configurations, plugins, scripts, and components used to build the website are located in this repository.

The main repository is polkadot-spec.

You'll need to clone the main repo if you want to build the entire website locally.

Documentation

Here you can find an explanation of how the website is built.

The macro scripts (npm run build and npm run start) are defined inside package.json.

They will call the bash scripts, located inside the scripts folder, and others in TypeScript located inside the preBuild folder.

The core thing to understand is that the website is built in two steps:

On top of this, the generated HTML pages will be affected by the scripts inside plugins.

Inside src and static there are custom components and static files used by the website.

scripts

The bash scripts inside this folder are called by the package.json scripts.

preBuild

These scripts are called before the Docusaurus build.

plugins

These scripts are called after the build or when the website pages are loaded in the browser.