Documentation Website
Add a new page
- Add a new markdown file under
/docs(names doesn't matter but you should name it wisely). - Add the following text in the top of file.
---
sidebar_position: 5
description: Docs for Docs
---
- Edit the markdown file.
- The
#header will be the title and also visible in the sidebar. - The
##and###will be rendered accordingly.
- The
sidebar_positionwill be used to determine order of pages in the sidebar.
Add a new folder
- Add a new directory under
/docs - Add a
_category_.jsonunder it and change the content accordingly.
{
"label": "Software Defined Radio",
"position": 2,
"link": {
"type": "generated-index",
"description": "Documentation for setting up Software Defined Radio on your local device."
}
}
- Add some pages under it.
Build & Deploy
Local
- run
npm run buildto build the static file. - run
npm run serverto serve it locally. With step 1 and 2, you will be able to see the latest page at your localhost (e.g. http://localhost:3000/adsb-nats/).
Remote
- run
npm run buildto build the static file. - Depending you github settings:
- If you are using SSH for your github, run
USE_SSH=true yarn deploy. This will deploy the change togh-pagesbranch and the changes will be reflected at ml4wireless.github.io/adsb-nats shortly. - If you are using passwords for your github, run
GIT_USER=[YOURUSERNAME] yarn deployand input your password when prompted. This will deploy the change togh-pagesbranch and the changes will be reflected at ml4wireless.github.io/adsb-nats shortly.
Don't forget to push your changes to docs branch as well!
References
For anything else, you can DM Victor on slack or try to find answers yourself at Docusaurus Deployment.