Sentinel documentation portal, built with Docusaurus.
Explore the docs »
Report Bug
·
Request Feature
Docusaurus is a static site generator that helps you ship beautiful, accessible docs. For building our documentation portal, we have made certain modifications over the template generated by Docusaurus.
This section describes how you can get our documentation portal up and running on your machine.
- Clone the repo
git clone https://github.com/sentinel-official/docs
- Install NPM packages
npm install
- Run the app
npm start
Navigate into your progect folder
cd docs
Create a folder named section-name
mkdir section-name
Create a new section in by adding a new section to SECTIONS[]
array with the defineSection()
utility easily.
const SECTIONS = [
defineSection('section-name'),
];
Create the navbar item section-name
themeConfig:
({
...
docs: {
...
},
navbar: {
...
},
items: [
{
label: 'Section Name',
to: 'section-name',
position: 'left',
},
],
},
...
}),
To add a newly created section to the Sections Menu, edit /src/sections.js
The section acan be added to the multisection menu
{
name: 'Section Name',
section: 'the section id',
description: 'Section description',
},
or the subsection menu
{
name: 'Section name',
id: 'section-name',
icon: SentinelCore,
section: 'section id',
},
Add the following block to ensure that the content in the new section is properly indexed by the Algolia plugin
"section-name": {
"lvl0": {
"selector": "",
"global": true,
"default_value": "section-name"
},
"lvl1": "article h1",
"lvl2": "article h2",
"lvl3": "article h3",
"lvl4": "article h4",
"lvl5": "article h5, article td:first-child",
"lvl6": "article h6",
"text": "article p, article li, article td:last-child"
},
Now, run npm run start
and you can access your 'new-section' at http://localhost:3000/new-section
That is it!
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. Sincere thanks to all our contributors. Thank you, contributors!
Contributions, issues, and feature requests are welcome! If you find this project valuable, please consider giving it a ⭐️!
Distributed under the Apache License, Version 2.0. See LICENSE
for more information.