Hosting gdbforge Documentation¶
The documentation site is built with MkDocs Material. Markdown sources live in docs/, while mkdocs.yml defines navigation, theme settings, extensions, and site metadata.
Local development¶
Install the documentation dependency:
Start the development server:
Open http://127.0.0.1:8765/. MkDocs watches the configuration and documentation files and reloads the browser after changes.
To use another address:
Only expose the development server on trusted networks.
Build the static site¶
The generated site is written to _site/. This directory is a build artifact and is excluded from Git.
To catch broken links and configuration warnings in local checks, use:
GitHub Pages¶
The workflow in .github/workflows/docs.yml builds and publishes the MkDocs site whenever documentation-related files change on main. It can also be started manually with workflow_dispatch.
One-time repository setup:
- Open Settings → Pages in GitHub.
- Under Build and deployment, select GitHub Actions as the source.
- Push the MkDocs files to
main, or run the Deploy docs workflow manually.
The project site is published at:
The workflow:
- Checks out the repository.
- Installs Python and the packages in
requirements-docs.txt. - Runs
python -m mkdocs build --clean. - Uploads
_site/as a GitHub Pages artifact. - Deploys the artifact.
Search engine optimization¶
The generated site includes:
- Unique page titles and descriptions
- Canonical URLs
- Open Graph and Twitter Card metadata
SoftwareApplicationandTechArticleJSON-LD structured datarobots.txtwith sitemap discoverysitemap.xmlandsitemap.xml.gz- Crawlable static HTML and semantic headings
After the first deployment, add https://yairgd.github.io/gdbforge/ as a URL-prefix property in Google Search Console and submit:
Important files¶
| Path | Purpose |
|---|---|
mkdocs.yml |
Site metadata, theme, navigation, and Markdown extensions |
requirements-docs.txt |
Documentation build dependencies |
docs/*.md |
Documentation pages |
docs/stylesheets/extra.css |
gdbforge theme customizations |
docs/javascripts/mermaid.js |
Mermaid diagram initialization |
docs/overrides/main.html |
Social metadata and JSON-LD template |
docs/robots.txt |
Search crawler and sitemap directives |
docs/media/ |
Screenshots, GIFs, and videos |
docs/serve.sh |
Local server launcher |
.github/workflows/docs.yml |
GitHub Pages deployment |
Adding a page¶
- Add the Markdown file under
docs/. - Add a concise, unique
descriptionin YAML front matter. - Add the page to
navinmkdocs.yml. - Link to it using a path relative to the current Markdown file.
- Run
python3 -m mkdocs build --strictbefore publishing.
Mermaid diagrams can be embedded directly: