This repository holds KIRA's documentation. It leverages Nocusaurus to extract content from KIRA's Notion workspace using the Notion API and transform it into sructured Markdown files. These files are then processed with Docusaurus v3 to generate static HTML files deployed via gutHub page.
Static site deployment branch: docs.kira.network
Build with us! Submit your project idea here, and get promoted.
git clone https://github.com/KiraCore/docs.kira.network.git
sudo apt update
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt install -y nodejs
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt update sudo apt install yarn
node -v npm -v yarn -v
3. **Install dependencies**:
```bash
yarn install # Install dependencies
Set Required Environment Variables: Set GIT_PASS
and GIT_USER
for GitHub deployment, and DOCU_NOTION_SAMPLE_ROOT_PAGE
and DOCU_NOTION_INTEGRATION_TOKEN
for Notion integration.
export GIT_PASS=[***]
export GIT_USER=[***]
export DOCU_NOTION_SAMPLE_ROOT_PAGE=[***]
export DOCU_NOTION_INTEGRATION_TOKEN=[***]
Follow the Docusaurus deployment documentation and Notion's integration setup guide for more details.
temp/
folderyarn pull # Fetch content from Notion (needs $DOCU_NOTION_SAMPLE_ROOT_PAGE and $DOCU_NOTION_INTEGRATION_TOKEN)
tabs/
folder, move pages from "srcpage" tabs into src/page/
folder if needed, then launch on localhost for testing
rsync --checksum
(yarn update
) syncstabs/
from the temporary folder, updating only changed files. It is used to preserveshowLastUpdateTime
in Docusaurus by avoiding the Nocusaurus pull process, which refreshes the entire output folder, falsely updating timestamps. However, renaming a page will not preserve history as it changes its file name and create a new one without git history.
yarn update # Push modifications from temp/ to tabs/
yarn srcpages # (Optional) This automatically move all custom pages from the tabs "srcpage" into the src/pages/ folder
yarn start # Start http://localhost:3000/ for testing
Committing and pushing updates made to
tabs
is necessary to maintain the Git history, essential for tracking each page'sshowLastUpdateTime
git status # (Optional) Lists pages that are modified + new pages that need to be added to commit
git add . # (Optional) Add all new created pages
git commit -a -m "commit message" # commit changes made to tabs/ etc...
git push
yarn build # Build Docusaurus static site
yarn serve # (Optional) Serve the build for additional testing before production deployment
yarn deploy # Deploy to GitHub Pages (needs $GIT_PASS and $GIT_USER)