Skip to content

KiraCore/docs.kira.network

Repository files navigation

KIRA's Documentation

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

Ecosystem

Build with us! Submit your project idea here, and get promoted.

Installation

  1. Clone Repository: Clone the repository to your local machine.
git clone https://github.com/KiraCore/docs.kira.network.git
  1. Install yarn and node
sudo apt update

# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install -y nodejs

# Install Yarn
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

# Verify installations
node -v
npm -v
yarn -v
  1. Install dependencies:
yarn install    # Install dependencies
  1. 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.

    • For GitHub Deployment:
      export GIT_PASS=[***]
      export GIT_USER=[***]
    • For Notion Integration:
      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.

Documentation Update & Deployment:

  1. Pull: Update content on Notion and pull in temp/ folder
yarn pull       # Fetch content from Notion (needs $DOCU_NOTION_SAMPLE_ROOT_PAGE and $DOCU_NOTION_INTEGRATION_TOKEN)
  1. Test: Sync the tabs/ folder, move pages from "srcpage" tabs into src/page/folder if needed, then launch on localhost for testing

rsync --checksum (yarn update) syncs tabs/ from the temporary folder, updating only changed files. It is used to preserve showLastUpdateTime 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
  1. Commit: Confirm tests, then commit and push

Committing and pushing updates made to tabs is necessary to maintain the Git history, essential for tracking each page's showLastUpdateTime

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
  1. Deploy: Build, serve if needed, and deploy
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)

Contributors