History
Jekyll
It was converted to a static site powered by Jekyll, a Ruby static site generator. Many authoring conventions from this era are still in use today: Markdown content files, Liquid templating, frontmatter, and
redirect_from support.Nanoc
The site migrated to Nanoc, another Ruby static site generator.
Technology stack
The application runs on Node.js (v24+) with the following core frameworks:- Express — HTTP server and middleware pipeline
- Next.js — React rendering and routing (currently transitioning from the pages router to the app router)
- React — UI components
- TypeScript — used throughout
src/
src/frame/server.ts, which calls src/frame/start-server.ts to initialize the Express app.
Subject folder pattern
Thesrc/ directory is organized by subject rather than by technical role (client, server, stylesheet, etc.). Each subject folder represents a major capability of the site and contains all the code for that capability in one place: middleware, components, scripts, tests, and documentation.
Two broad folders exist for code that is difficult to assign to a specific subject:
src/frame/— cross-cutting infrastructure (header, footer, global sidebar, middleware orchestration)src/workflows/— process automation rather than production application code
Key src/ directories
src/frame/
The “spine” of the application. Handles Express server setup, the full middleware pipeline, shared React layout components (header, footer, global sidebar), the
req.context object, and Next.js integration. Code belongs here only when it is truly cross-cutting — used by three or more subjects — or is fundamental infrastructure.src/content-render/
Markdown rendering pipeline. Transforms raw Markdown files (with Liquid templating) into HTML served to the client. Includes remark/rehype plugins for GFM, syntax highlighting, and custom GitHub Docs extensions.
src/search/
Elasticsearch-backed search. Exposes the
/api/search/v1 and /api/search/ai-search-autocomplete/v1 endpoints, browser-side search components, and the scraping and indexing scripts used to populate the search index.src/rest/
REST API reference documentation pipeline. Auto-generates Markdown in
content/rest/ from the OpenAPI description in github/rest-api-description. Contains the sync script, generated data files, and config.src/graphql/
GraphQL API reference documentation. Similar pipeline to REST — syncs schema data and generates documentation pages for the GraphQL API.
src/webhooks/
Webhook event reference documentation. Shares the sync pipeline with REST and GitHub Apps (
sync-openapi.yml).src/content-linter/
Content quality checking. Runs markdownlint rules and custom rules against Markdown files in
content/ and data/. Used in CI and as a pre-commit hook.src/languages/
Internationalization. Language detection middleware, translation file management, and the
ENABLED_LANGUAGES configuration that controls which languages the server serves.src/versions/
Version management. Detects the requested GitHub product version from URLs and populates
req.context with version information for conditional rendering.src/redirects/
URL redirect handling. Builds and serves the redirect map derived from
redirect_from frontmatter and other redirect sources.Middleware pipeline
The middleware pipeline is defined insrc/frame/middleware/index.ts and executes in this order for every request:
- Connection management — timeout handling and abort detection
- Security and headers — Helmet, CORS
- Language detection — parses
Accept-Languageheaders and URL language prefix - Context initialization — builds the base
req.contextobject - URL normalization and redirects — resolves redirect rules before serving content
- Page finding — locates the matching page in the site tree
- Subject-specific middleware — version detection, feature flags, breadcrumbs, TOC
- Page rendering — renders Markdown to HTML and sends the response
- Error handling — 404 and 500 error pages
Build and run
- Development
- Production / CI
- Debug
NODE_ENV=development and ENABLED_LANGUAGES=en. It uses nodemon to reload on changes to .ts, .json, .yml, .md, .html, and .scss files.Visit http://localhost:4000 when the server is running.Adding a new subject folder
When a new capability grows to the point of having its own tests, create a subject folder undersrc/:
Add tests to the workflow
Open
.github/workflows/test.yml and add an entry for your test files. This file is manually maintained — new test files do not run automatically.Add to branch protection
After your entry in
test.yml merges to main, add it to the branch protection required checks so it gates pull requests.