This website is built using Docusaurus 2, a modern static website generator.
This website is automatically deployed to https://docs.ethpandaops.io on merge to master
and previews are generated in pull requests with links in the comments. This is done via Cloudflare pages.
npm install
npm start
npm run build
Documents are stored in ./docs
directory and are separated into sub directories which will be referred to as a "document group".
A new document group can be added by simply creating a new directory and adding at least one markdown file. From there the ./sidebars.js
config needs to be updated. An example would be adding a foobar
document group which would require a new directory of ./docs/foobar/
to be created with an example markdown file of ./docs/foobar/banana.md
;
const sidebars = {
introSidebar: ['intro'],
onboardingSidebar: [{type: 'autogenerated', dirName: 'onboarding'}],
observabilitySidebar: [{type: 'autogenerated', dirName: 'observability'}],
// add the foobar document grouping
foobarSidebar: [{type: 'autogenerated', dirName: 'foobar'}],
};
You can also add the grouping to the top navbar by updating ./docusaurus.config.js
and adding the new navigation items;
// config.themeConfig.navbar.items
// ...
items: [
{
type: 'doc',
docId: 'onboarding/intro',
position: 'left',
label: 'Onboarding',
},
{
type: 'doc',
docId: 'observability/intro',
position: 'left',
label: 'Observability',
},
// new foobar top nav link
{
type: 'doc',
docId: 'foobar/banana',
position: 'left',
label: 'FooBar',
},
// ...