This repository contains the Fidgetech Code curriculum, built with Docusaurus 2.
- Location: All curriculum content is in the
docs/directory - Organization: Content is organized into courses and sections (e.g.,
docs/0_pre-work/,docs/introduction-to-programming/) - Sidebar: Navigation is manually configured in
sidebars.json
- URL structure: Determined by the directory path and the
idfield in each lesson's frontmatter - Example:
- File:
docs/0_pre-work/1_getting-started-with-intro-to-programming/AA-1-0-0-14-welcome-to-intro.md - Frontmatter
id:1-0-0-14-welcome-to-intro - Resulting URL:
/pre-work/getting-started-with-intro-to-programming/1-0-0-14-welcome-to-intro
- File:
(Note that the URL does not include the directory prefixes e.g. 0_ or 1_.)
- 1st digit is course number (4 for react, tho will change to 3 in next version)
- 2nd digit is 0 for pre-work, 1 for 1st section after pre-work, etc.
- 3rd digit is segment (based on epicodus day) - pre-work/weekend is 0, monday is 1, etc.
- last digit is sequence of lesson within day
- Site config:
docusaurus.config.js - Sidebar structure:
sidebars.json - Styles:
src/css/custom.css - Search: Algolia DocSearch (configured in
docusaurus.config.js)
This project uses versioned docs:
- Current version: v1.2 (default)
- Previous versions: v1.1
- Older versions are managed in
docusaurus.config.js,versions.json,versioned_sidebars.json, andversioned_docs/.
When adding or modifying lessons:
- Create/edit markdown files in the appropriate
docs/subdirectory - Ensure frontmatter includes a unique
idfield - Update
sidebars.jsonto include the new lesson in navigation - Test locally with
npm startbefore committing
Install dependencies:
npm installStart the development server:
npm startThis opens a browser window at http://localhost:3000. Most changes are reflected live without restarting the server.
Generate static content for production:
npm run buildThis creates optimized static files in the build/ directory, ready for deployment to any static hosting service.
Deploy to the gh-pages branch:
With GitHub Actions:
Merge to the main branch to trigger the triggered-prep-build-deploy.yml workflow.
This builds the site and deploys it to GitHub Pages automatically.
Scans all markdown files for broken external links and images.
Setup:
Add these environment variables to .env (for local use) and GitHub Secrets (for CI):
SCRIPT_BROKEN_LINKS_SENDGRID_API_KEY=your_sendgrid_api_key
SCRIPT_BROKEN_LINKS_FROM=sender@example.com
SCRIPT_BROKEN_LINKS_TO=recipient@example.com
SCRIPT_BROKEN_LINKS_CC=cc@example.com # optional
Run locally:
npm run find-broken-linksIn production (GitHub Actions), the script emails results to the configured recipients.