Skip to content

Repository files navigation

Cheatsheets

A growing collection of clean, privacy-first developer cheatsheets — read them on the web, or download each as PDF, Markdown, or single-file HTML.

Live site: https://michalaferber.github.io/cheatsheets/

Built with Material for MkDocs (coral theme, self-hosted JetBrains Mono, sidebar nav + built-in search) and deployed to GitHub Pages.

Repository layout

.
├── mkdocs.yml                  # MkDocs config: theme, palette, nav, extensions
├── docs/                       # Site source
│   ├── index.md                #   Home page (generated by scripts/gen-nav.mjs)
│   ├── linux-commands.md       #   One Markdown page per cheatsheet
│   ├── …
│   ├── stylesheets/extra.css   #   Coral palette + JetBrains Mono @font-face + pills
│   └── assets/
│       ├── favicon.svg         #   Coral SVG favicon / logo
│       └── fonts/*.woff2       #   Self-hosted JetBrains Mono (400/500/700)
├── downloads/                  # PDF + Markdown + HTML per cheatsheet (served as-is;
│                               #   copied into the built site by the workflow)
├── scripts/
│   ├── gen-nav.mjs             #   Rebuilds the mkdocs.yml nav + docs/index.md
│   └── gen-downloads.mjs       #   Rebuilds the downloads/ files from docs/
├── .github/workflows/
│   └── deploy-pages.yml        #   Builds with MkDocs and deploys to Pages
├── LICENSE
└── README.md

downloads/ lives outside docs/ on purpose: MkDocs renders any .md inside docs/ as a page, so the raw Markdown downloads are kept out and copied into the site (cp -r downloads site/downloads) after mkdocs build.

Adding a cheatsheet

  1. Create docs/<slug>.md with front matter, an H1, and the download pills:

    ---
    title: "Docker"
    description: "Build, run, and clean up containers."
    category: "DevOps"     # Shell & CLI | Editors | DevOps | Languages & Data | macOS
    ---
    # Docker
    
    <p class="dl-pills">
    <a class="dl-pill" href="../downloads/docker.pdf">PDF</a>
    <a class="dl-pill" href="../downloads/docker.md">Markdown</a>
    <a class="dl-pill" href="../downloads/docker.html">HTML</a>
    </p>
    
    ## Images
    
    | Command | Action |
    | --- | --- |
    | `docker ps` | list running containers |
  2. Generate the download files (.md + .html, and --pdf if Chromium is available):

    npm install                                   # once — marked + highlight.js
    node scripts/gen-downloads.mjs docker --pdf
  3. Regenerate the nav + home page from the front matter:

    node scripts/gen-nav.mjs
  4. Commit and push to main — the workflow rebuilds and redeploys.

Local development

python3 -m venv .venv && .venv/bin/pip install mkdocs-material
.venv/bin/mkdocs serve         # http://127.0.0.1:8000/cheatsheets/

mkdocs serve doesn't include the top-level downloads/. To preview the download links, run mkdocs build && cp -r downloads site/downloads and serve site/.

Deployment

Handled by .github/workflows/deploy-pages.yml: it installs mkdocs-material, runs mkdocs build, copies downloads/ into the site, and deploys. Repo setting: Settings → Pages → Source → GitHub Actions.

Privacy & analytics

The site is privacy-first: no cookies, no ad trackers, and no personal data leaves your browser. Aggregate traffic counts come from a self-hosted Plausible instance — it is cookie-less, stores no personally identifiable information, and does no cross-site tracking. There is nothing to consent to and nothing to opt out of.

Credits

This site is built on open-source work:

Component License Role
Material for MkDocs MIT Site theme — layout, sidebar nav, search
MkDocs BSD-2-Clause Static-site generator
marked 12.x MIT Markdown → HTML in the download builder
highlight.js 11.x BSD-3-Clause Syntax highlighting in the PDF/HTML downloads
JetBrains Mono OFL-1.1 Text + code typeface (self-hosted, no Google Fonts)

Deviations from the TGWAB Dev Standards

This is a Class C micro-project — a static content site on GitHub Pages — so a few of the standard's requirements are scoped down or waived. For transparency:

  • The site uses a coral favicon/brand mark rather than a bespoke logo.
  • No Privacy Policy or Terms pages. The site is static and collects no personal data (see Privacy & analytics), so there is nothing for those pages to govern.
  • §4's Class C deploy path (GitHub Pages' own Jekyll build from main) does not apply. This site is built with MkDocs Material, which the platform build cannot produce, so the one deploy path is a single GitHub Actions workflow to Pages. §4's binding rule is exactly one deploy path, and that is satisfied — there is no second path and no superseded workflow. What is deviated from is the doctrine table's Class C row, which names Jekyll because that is what GitHub Pages builds natively. Converting the content would mean losing admonitions, tabbed blocks, and superfences for no reader-visible gain.
  • §11 (SEO/plumbing kit) and §12 (_headers / CSP) do not apply. They target Cloudflare-hosted apps; GitHub Pages cannot serve custom response headers, and a micro-project does not need the full SEO kit.
  • Analytics is self-hosted Plausible, following the standard's privacy-friendly-analytics guidance.

License

Released under the MIT License. © Michal Ferber.

About

Clean, privacy-first developer cheatsheets — web, PDF & Markdown. Material for MkDocs on GitHub Pages.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages