How airchains-network/docs works
Project type and purpose
• This is a documentation-centric static website built with the Docusaurus framework.
• Purpose: host and render Markdown-based docs (guides, API references, tutorials) for the Airchains blockchain platform.
File structure
• Top-level:
• docusaurus.config.js, sidebars.js – Docusaurus site config and sidebar definitions
• package.json / package-lock.json – Node.js build and dependency config
• .github/workflows/deploy.yml – CI/CD pipeline for automatic builds & deploys
• docs/ – all Markdown content organized by topic (api-reference, rollups, develop, etc.)
• src/ – custom React components and CSS overrides used by the Docusaurus theme
• static/ – static assets (images, .nojekyll file) copied verbatim to output
• babel.config.js – Babel settings for custom JSX code in src/
README for additional insights
• Confirms use of Node.js and Docusaurus
• Emphasizes contribution workflow and CI/CD via GitHub Actions
a. Main components:
• Authoring environment: Markdown files in docs/ + custom components in src/
• Build system: Node.js + Docusaurus CLI + Babel
• CI/CD pipeline: GitHub Actions (.github/workflows/deploy.yml)
• Static file output: HTML/CSS/JS bundles + static assets
• Hosting layer: GitHub Pages, Netlify, or another CDN (implied by deploy.yml)
• Browser/Client: end-users render static site and search via built-in Algolia or local search index
b. Relationships and interactions:
1. Developer pushes changes (docs/, src/, config) → triggers GitHub Actions
2. CI job installs Node.js → npm install → npm run build (Docusaurus builds)
3. Build outputs under /build (static HTML, JS, CSS, assets)
4. CI deploy step copies /build to hosting (GitHub Pages / CDN)
5. End-user browser fetches static assets over HTTPS → renders pages + client-side React enhancements (e.g., SearchBar.js)
c. Architectural patterns and design principles:
– Static Site Generator (SSG) pattern: pre-render content at build time
– Component-based UI via React for custom theming and dynamic features (search bar, navigation)
– Content/config separation: docs Markdown vs. theme/config files
– CI/CD automation for continuous documentation delivery
d. Key technologies/frameworks:
– Docusaurus v2 (React, MDX support)
– Node.js (v18+) build runtime
– Babel for JSX transpilation
– GitHub Actions for CI/CD
– Optional: Algolia or local search indexing