Lab Notes (this site)¶
At a glance
| Status | Live |
| Stack | Python, MkDocs, Material for MkDocs, GitHub Actions, GitHub Pages |
| Source | jakeumm/lab-notes |
| Site | lab-notes.jakescloud.net |
Overview¶
A static portfolio site where I write up the projects I build. Pages are plain Markdown in docs/,
Material for MkDocs turns them into a searchable site,
and every push to main deploys it to GitHub Pages.
How it works¶
flowchart LR
A[Markdown in docs/] --> B[mkdocs build --strict]
C[mkdocs.yml] --> B
B --> D[site/ artifact]
D --> E[GitHub Pages]
F[git push main] -.triggers.-> B
Repo layout¶
lab-notes/
├── .github/workflows/deploy.yml # build + deploy to Pages
├── docs/
│ ├── index.md # home page with featured cards
│ ├── about.md
│ ├── tags.md # auto-generated tag index
│ ├── projects/
│ │ ├── index.md # project list
│ │ └── lab-notes.md # this page
│ ├── assets/ # screenshots/images
│ └── stylesheets/extra.css
├── mkdocs.yml # site config, theme, nav
└── requirements.txt # mkdocs<2, mkdocs-material 9.x
Setup steps¶
- Scaffolded the site. I wrote
mkdocs.ymlby hand instead of runningmkdocs new, so the theme, features, and Markdown extensions were set up in one go:- Light/dark palette toggle (follows the OS preference)
- Navigation tabs, sections, index pages, back-to-top, instant loading
- Search with suggestions and highlighting, copy buttons on code blocks, "edit this page" links
- Extensions: admonitions, content tabs, task lists, emoji/icons, card grids (
attr_list+md_in_html), and Mermaid diagrams throughpymdownx.superfences tagsplugin with atags.mdindex page
- Wrote the content pages. A home page with a hero section and "featured" cards, a projects index, an about page, and a reusable project page layout (an at-a-glance table, overview, how it works, what I learned, and a roadmap).
- Pinned dependencies. Material prints a warning that MkDocs 2.0 drops the plugin system and theme overrides,
so
requirements.txtlimitsmkdocsto>=1.6,<2along withmkdocs-material>=9.5,<10. - Verified locally.
- Added CI/CD.
.github/workflows/deploy.ymlruns on every push tomain. It installs dependencies, runsmkdocs build --strict, uploadssite/withactions/upload-pages-artifact, and deploys withactions/deploy-pages. - Turned on Pages. Repo Settings → Pages → Source: GitHub Actions. Don't pick the suggested Jekyll or static HTML starter workflows; the repo already has its own.
Gotchas¶
Local preview path follows site_url
The dev server serves the site under site_url's path. With the default GitHub Pages URL
(jakeumm.github.io/lab-notes/) that was http://127.0.0.1:8000/lab-notes/. After switching to the custom
domain lab-notes.jakescloud.net, it's served at the root, http://127.0.0.1:8000/.
Strict builds
--strict turns warnings (broken links, pages missing from nav) into errors, so CI catches them before deploy.
Adding a new project¶
- Create
docs/projects/<name>.md(copy this page's structure). - Add it under Projects in
navinmkdocs.yml. - Add a card to
docs/projects/index.md(anddocs/index.mdif it's featured). - Put images in
docs/assets/and reference them with.
Roadmap¶
- Scaffold Material for MkDocs site
- GitHub Actions deploy to Pages
- Add real projects
- Add screenshots and a custom favicon/logo