SYS_PORTFOLIO_V1.0

"Behind You, a Syntax Error..."

?
Open this help
H / Home
Home
J
Journal
P
Projects
A
About
M
Toggle the navigation menu
← / →
Move between focused menu links
Ctrl + ← / →
Previous or next journal entry
Esc
Close this help or the navigation menu
───[ JOURNAL_ENTRY ]─── BACK_TO_ARCHIVE

How This Blog Engine Works

───[ DM_READS ]───

You open the engine room of this site: markdown in `_posts`, metadata in an index, rendering in the browser. No Jekyll golem—just fetch, parse, and paint. Scheduled posts hide until their date; one npm script refreshes the manifest.

Meta quest, low drama. Useful when you wonder why the journal behaves like a terminal archive, not a CMS theme.

───[ ON_THIS_PAGE ]───

This site’s blog is a client-side markdown engine: posts are single source of truth in _posts/ as .md files, and nothing is pre-rendered to HTML at build time. Here’s how it fits together.

Single source of truth

All posts live in _posts/ with date-prefixed filenames (YYYY-MM-DD-slug.md). There is no duplicate HTML copy. The browser fetches the markdown file for the post you’re viewing and renders it on the client.

Index and manifest

The listing (blog index page) needs metadata: title, date, slug, excerpt, etc. That comes from:

  1. js/posts-index.json — Generated by npm run generate-index. It’s a JSON array of post metadata. The engine loads this first. One request, full list, already sorted by date.
  2. _posts/manifest.json — Fallback. If the index fetch fails (e.g. missing or wrong path), the engine fetches this file, which is a simple array of filenames in the same order as the index. It then fetches each .md file, parses front matter, and builds the list in memory. Same script that generates the index also writes the manifest so they stay in sync.

So: index for fast listing; manifest so the site still works if the index isn’t there.

Loading a post

When you open a post (e.g. journal/post.html?slug=how-this-blog-engine-works):

  1. The engine already has (or loads) the posts list, finds the entry for that slug, and gets the filename (e.g. 2026-03-05-how-this-blog-engine-works.md).
  2. It fetches _posts/<filename>.md with fetch().
  3. It parses front matter (the --- block at the top) for title, date, excerpt, optional multiline scene: |, and treats the rest as markdown.
  4. Optional scene (DM_READS) and tldr (TL;DR, or excerpt if tldr is omitted) render above the article; the index and meta tags still use excerpt.
  5. Previous / Next links (and Ctrl+← / Ctrl+→) walk the published list—previous = older entry, next = newer.
  6. The markdown is rendered to HTML in the browser (this site uses marked from a CDN).
  7. The resulting HTML is injected into the page and meta tags are updated for sharing.

No server-side rendering. No static HTML for each post. Just markdown over the wire and client-side render.

Why .nojekyll?

The site is hosted on GitHub Pages. By default, Jekyll treats _posts and other underscored folders in special ways. A .nojekyll file in the repo root tells GitHub Pages to serve the site as plain static files. That way _posts/*.md are served as-is and our client can fetch() them. Without it, you might get redirects or processing that break the simple “fetch markdown, render here” model.

Workflow

  1. Write or edit a post in _posts/ (with or without YAML front matter; the generator can derive metadata from filename and first # heading).
  2. Run npm run generate-index so js/posts-index.json and _posts/manifest.json are updated.
  3. Push — the site works. New and updated posts appear in the list and load when you open them.

That’s the engine: markdown in _posts/, index (and optional manifest) for the list, client fetch + parse + render, and one command to keep the index up to date.

Scheduled posts (a future date in front matter) are filtered client-side: they do not appear in the listing and show a "scheduled" notice when opened by direct link until the publish date (UTC). The engine supports scheduled visibility by date in addition to the rest above.

Licensed under CC BY-NC-ND 4.0. You may share with attribution under the license terms.