|
| 1 | +# tmck-code.github.io |
| 2 | + |
| 3 | +My blog — a GitHub *user* Pages site (served from the domain root, `baseurl: ""`) |
| 4 | +built with Jekyll and a small **local theme** that lives in this repo. No |
| 5 | +`remote_theme`, no gems beyond what `actions/jekyll-build-pages` ships. |
| 6 | + |
| 7 | +## What's built |
| 8 | + |
| 9 | +| Path | Purpose | |
| 10 | +|---|---| |
| 11 | +| `_layouts/` | `default` (html shell, theme pre-paint, navbar/footer/palette), `home`, `page`, `post` | |
| 12 | +| `_includes/` | partials: `head`, `navbar`, `footer`, `article-list`, `article-meta`, `post-row`, `repo-card`, `terminal`, `codeblock`, `icon` (SVG sprite), `palette` (⌘K search), `robot-mark` | |
| 13 | +| `assets/css/tokens/*.css` | design tokens — colours (dark/light via `data-theme`), spacing, typography, motion, effects | |
| 14 | +| `assets/css/site.css` | all component styles, built on the tokens | |
| 15 | +| `assets/js/site.js` | behaviour: theme toggle (persisted in `localStorage['theme']`), copy-to-clipboard + toasts, clock, list filtering/tabs, command palette, GitHub star/fork enrichment | |
| 16 | +| `assets/img/` | logo/avatar SVGs, icon sprite, hex texture | |
| 17 | +| `_data/pages.yml` | cards for the interactive one-offs under `pages/` (shown on `pages.html`) | |
| 18 | +| `_data/repos.yml` | pinned repos for `projects.html` (static star/fork fallbacks) | |
| 19 | +| `index.html`, `posts.html`, `projects.html`, `pages.html`, `about.html` | the top-level pages | |
| 20 | +| `feed.xml` | Atom feed of listed articles (`/feed.xml`), templated over the same `article-list.html` query | |
| 21 | +| `articles/<slug>/<slug>.md` | blog posts — every one has YAML front matter (`title`, `date`, `blurb`, `tags`, `unlisted`) and uses the `post` layout via `_config.yml` defaults | |
| 22 | + |
| 23 | +Fonts (Space Grotesk, IBM Plex Sans, JetBrains Mono, Victor Mono) are loaded from |
| 24 | +Google Fonts in `_includes/head.html`. |
| 25 | + |
| 26 | +### Adding an article |
| 27 | + |
| 28 | +```sh |
| 29 | +./create_article.py -title 'My Title' -description 'one-line blurb' |
| 30 | +``` |
| 31 | + |
| 32 | +This creates `articles/<YYYYMMDD>_<slug>/<slug>.md` with front matter + heading, |
| 33 | +and prepends an entry to the article list below the `---` in this README. |
| 34 | +Set `unlisted: true` in the front matter to keep a post out of the list/palette |
| 35 | +while leaving it reachable by URL. |
| 36 | + |
| 37 | +## Building |
| 38 | + |
| 39 | +### GitHub Actions (production) |
| 40 | + |
| 41 | +`.github/workflows/jekyll-gh-pages.yml` runs on every push to `main` (or |
| 42 | +manually via *workflow_dispatch*): `actions/jekyll-build-pages@v1` builds the |
| 43 | +site into `_site/` with the github-pages gem's default plugin set |
| 44 | +(`jekyll-relative-links`, `jekyll-optional-front-matter`, |
| 45 | +`jekyll-titles-from-headings`, `jekyll-readme-index`, …) and |
| 46 | +`actions/deploy-pages@v4` publishes it. Nothing is built or committed locally. |
| 47 | + |
| 48 | +### Locally |
| 49 | + |
| 50 | +There is no `Gemfile` checked in — match the Actions build by using the |
| 51 | +`github-pages` gem, or the same thing in Docker: |
| 52 | + |
| 53 | +```sh |
| 54 | +# ruby/bundler |
| 55 | +gem install github-pages |
| 56 | +jekyll serve --livereload # http://127.0.0.1:4000 |
| 57 | + |
| 58 | +# or docker, no ruby on the host |
| 59 | +docker run --rm -it -p 4000:4000 -v "$PWD":/site -w /site --user "$(id -u):$(id -g)" \ |
| 60 | + --entrypoint jekyll ghcr.io/actions/jekyll-build-pages:latest \ |
| 61 | + serve --host 0.0.0.0 --livereload |
| 62 | +``` |
| 63 | + |
| 64 | +`_site/`, `.jekyll-cache/` and `.sass-cache/` are gitignored. Because |
| 65 | +`baseurl` is empty and assets are root-absolute (`/assets/...`), the local |
| 66 | +server must be served from the root too (the default for `jekyll serve`). |
| 67 | + |
| 68 | +--- |
1 | 69 | ### [20260415 KSF Surf Maps: Data Visualisation](articles/20260415_ksf_surf_maps_data_visualisation/20260415_ksf_surf_maps_data_visualisation.md) |
2 | 70 |
|
3 | 71 | > _Charts and insights for surf maps on KSF servers_ |
|
0 commit comments