Skip to content

Blog infrastructure for visualci.com/blog (no posts yet) - #101

Merged
ndbroadbent merged 2 commits into
mainfrom
marketing-blog
Dec 3, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
marketing-blog

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

The blog for visualci.com/blog, modelled on Talira's: a folder of Markdown posts with front matter, prerendered into the static site with the docs' design. No posts yet, so merging this changes nothing on the site. /blog/ and its links appear with the first post (draft PR to follow).

How a post works

  • server/frontend/content/blog/<slug>.md is the post at /blog/<slug>/, with a Markdown copy at /blog/<slug>.md for agents.
  • Front matter:
    • Required: title, description, date (YYYY-MM-DD) and author.
    • Optional: image, a PNG or JPG in the post's folder, used as its link-preview card (og:image and twitter:image).
    • Optional: draft: true, which keeps a post out of the build unless VISUALCI_BLOG_DRAFTS=1, for a dev preview.
  • Images: the files in content/blog/<slug>/ are served next to the post, so ![Chart](chart.png) just works. Relative links become absolute in the Markdown copy and the feed.
  • Pages:
    • Each post is a standalone docs-design page, like /compare/ and the legal pages, with a date and author line under the title.
    • /blog/ lists the posts, newest first.
    • /blog/feed.xml is an Atom feed with each post's full HTML, linked from every blog page's <head>.
  • The footer's "Blog" link appears only once a post is published: vite.config.ts reads content/blog at build time (scripts/has-blog.mjs), counting drafts with VISUALCI_BLOG_DRAFTS=1.
  • A published post with a [TODO placeholder fails the build, so a post waiting on a fact stays a draft.
  • llms.txt gets a Blog section listing the posts' Markdown copies. The sitemap picks the pages up automatically.
  • Checks:
    • scripts/blog.mjs fails the build on missing front matter, a bad date, a reserved slug, or a missing image file.
    • site.mjs checks that every post has its Markdown copy, its llms.txt link and a feed entry, and that /blog/ is never built empty.

Tested on docspring-dev

  • No posts: the build is unchanged (172 files, no /blog/) and site.mjs passes.
  • With a temporary test post (an image, a docs link, a code block) and a draft:
    • The post, index, feed, image, og:image, Markdown copy, llms.txt section and sitemap entries were all right.
    • The draft stayed out.
    • Screenshots at 1440 and 390 wide, light and dark, matched the docs pages.
    • The test files were removed before committing.

Styles: .blog-meta, .blog-list and .blog-item, using the existing tokens (text-sm, color-muted, color-rule, space-*), plus max-width: 100% for images in docs content.

…, author; optional image and draft) prerendered to /blog/<slug>/ in the docs' design with a Markdown copy and its folder's files, /blog/ listing the posts, an Atom feed at /blog/feed.xml, per-post link-preview images, llms.txt and the sitemap. With no published posts nothing is built, so the site never links an empty blog
…s reads content/blog at build time; drafts count with VISUALCI_BLOG_DRAFTS=1), and a published post with a [TODO placeholder fails the build
@ndbroadbent
ndbroadbent merged commit 0c99d4a into main Dec 3, 2026
11 checks passed
@ndbroadbent
ndbroadbent deleted the marketing-blog branch December 3, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant