This website is built using Docusaurus and is automatically deployed to GitHub Pages.
# Install dependencies
npm install
# Start local development server
npm startThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
This repository is configured with GitHub Actions to automatically deploy to GitHub Pages whenever changes are pushed to the main branch.
The deployment process:
- When you push to
main, the GitHub Action workflow is triggered - It builds the Docusaurus site
- Deploys the built site to the
gh-pagesbranch - GitHub Pages serves the content from the
gh-pagesbranch
If you need to deploy manually:
# Set your GitHub username
export GIT_USER=<Your GitHub username>
# Deploy to GitHub Pages
npm run deploy:githubThe site configuration is in docusaurus.config.ts. Key settings include:
url: The URL where the site is hosted (currently set tohttps://cedra-labs.github.io)baseUrl: The base URL path (currently set to/)organizationNameandprojectName: Used for GitHub Pages deployment
This documentation site uses Algolia DocSearch for powerful search capabilities.
- Create a
.envfile in the project root with your Algolia API keys:
ALGOLIA_APP_ID=YOUR_ACTUAL_APP_ID
ALGOLIA_API_KEY=YOUR_ACTUAL_API_KEY
ALGOLIA_INDEX_NAME=Main- The environment variables will be loaded automatically when you start the development server.
To use Algolia search in your deployed site, add these environment variables to your GitHub repository:
-
Go to your GitHub repository
-
Navigate to "Settings" > "Secrets and variables" > "Actions"
-
Click "New repository secret" and add the following secrets:
- Name:
ALGOLIA_APP_ID, Value: Your Algolia application ID - Name:
ALGOLIA_API_KEY, Value: Your Algolia API key - Name:
ALGOLIA_INDEX_NAME, Value: Your Algolia index name (usually "Main")
- Name:
-
Update your GitHub Actions workflow file (
.github/workflows/deploy.yml) to include these environment variables:
jobs:
deploy:
# ... existing configuration ...
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}
# ... rest of the configuration ...- Documentation pages are in the
docs/directory - Sidebar navigation is configured in
sidebars.ts - Static assets go in the
static/directory