Reference

Public Content API

Read-only API for published posts, journal entries, and pages. Use explicit endpoints: .json for JSON and .md for markdown.

Base URL https://headofengineering.com

Posts

Access published blog posts as structured JSON or raw markdown.

GET /api/posts.json

List posts

View as Markdown

Returns all published posts sorted by publication date descending.

Parameters

This endpoint does not accept parameters.

Returns

A list object with compact post metadata (no full content body).

GET /api/posts/{slug}.json

Retrieve a post

View as Markdown

Returns one post including full markdown content.

Parameters

slug string required
The post slug (for example: the-startup-minded-engineers).

Returns

A post object with metadata and full markdown body.

GET /api/posts/{slug}.md

Retrieve post markdown

View as Markdown

Returns the raw markdown document including frontmatter.

Parameters

slug string required
The post slug.

Returns

A text/markdown response with frontmatter + markdown body.

Journal

Access weekly journal entries in JSON or markdown format.

GET /api/journal.json

List journal entries

View as Markdown

Returns all published journal entries sorted by publication date descending.

Parameters

This endpoint does not accept parameters.

Returns

A list object with journal metadata.

GET /api/journal/{slug}.json

Retrieve a journal entry

View as Markdown

Returns one journal entry with full markdown content.

Parameters

slug string required
The journal slug (for example: 2025-11-16).

Returns

A journal_entry object with metadata and full content.

GET /api/journal/{slug}.md

Retrieve journal markdown

View as Markdown

Returns journal entry markdown including frontmatter.

Parameters

slug string required
The journal slug.

Returns

A text/markdown response with frontmatter + markdown body.

Pages

Access static pages such as About in JSON or markdown format.

GET /api/pages.json

List pages

View as Markdown

Returns all public static pages.

Parameters

This endpoint does not accept parameters.

Returns

A list object with page metadata.

GET /api/pages/{slug}.json

Retrieve a page

View as Markdown

Returns one static page with full markdown content.

Parameters

slug string required
The page slug (for example: about).

Returns

A page object with metadata and full content.

GET /api/pages/{slug}.md

Retrieve page markdown

View as Markdown

Returns raw page markdown including frontmatter.

Parameters

slug string required
The page slug.

Returns

A text/markdown response with frontmatter + markdown body.

Errors

This API is deployed as static files. Unknown API paths return the site's HTML 404 page.

Error 404 text/html (static)

Error behavior

Current deployment (Cloudflare Pages static)

  • Known prebuilt endpoints return 200.
  • Unknown paths (for example /api/posts/invalid-slug.json) return the platform/site HTML 404 page.

Optional runtime mode

If you move these routes to runtime Functions/SSR later, you can return a consistent JSON error object with:

  • not_found: resource is missing (404)
  • invalid_request: malformed input (400)
  • internal_error: unexpected server error (500)