Repository navigation
Releases
Releases · gdonald/Blogin
v0.9.6
Fixed
- The build fingerprint hashed the bytes of
blogin.jsoninstead of the
configuration the build was given. An edit toblogin.jsonwhileblogin serveran was rendered with the old configuration and recorded under the new
file's fingerprint, so after a restart no page was rendered again. The
fingerprint now hashes the configuration itself, which also covers a key
overridden on the command line, such as--debug. - An incremental build removed the alias redirects of every page it did not
render, because a reused page's aliases were not saved in the build state.
v0.9.5
Added
- Share images. An
imagekey in a post's front matter, or inblogin.jsonas
the default for every other page, makeshead-metawriteog:imageas an
absolute URL underbase-url, pointing at the fingerprinted name when
fingerprintis on.og:image:widthandog:image:heightare read from the
file's PNG, JPEG, GIF, or WebP header, andtwitter:cardbecomes
summary_large_image. The build warns about an image it cannot find or
measure. - On post pages,
head-metawritesarticle:published_timefromdate,
article:modified_timefrom a newupdatedfront-matter key, and one
article:tagper tag. - JSON-LD structured data: a
BlogPostingon each post page and aWebSiteon
the front page. - The sitemap gives each post a
<lastmod>, fromupdatedor elsedate. head-metalinks each configured site-wide feed with<link rel="alternate">.noindex: the 404 page, listing pages after the first, and any post with
noindex: truecarry a robotsnoindextag and are left out of the sitemap.- A
twitterkey inblogin.json, written astwitter:siteand
twitter:creator.
Fixed
- A long run of operators in a template expression, such as
1 + 1 + 1 ...
thousands of terms long, overflowed the stack while it was evaluated. A chain
is now measured as it is parsed and refused past the same 64-level limit that
parentheses already had, with a "nested too deeply" error. - A section's
layoutinblogin.jsonwas read and then ignored, so its posts
rendered throughshow.haml. They now render through the named layout, after
a post's own front-matterlayoutand beforeshow.haml. - The scaffolded
show.hamlwrote the date line as an expression string, which
does not interpolate, so every post on a new site showed
#{date} · #{reading-time} min read. It is HAML text now and shows the date
and reading time. - Rendering threads now get an 8 MiB stack on every platform. macOS gives a
new thread 512 KiB, which an expression nested to the evaluator's limit could
overflow in a sanitizer build.
Testing
scripts/test.shruns one stage at a time and stops at the first stage that
fails. That stage's output is printed and kept inbuild/test-logs/, along
with every other stage's.--serialis gone, and-jsets the cores each
stage gets.- A stage now stops at its first failing command. Before, bash ignored
set -e
inside the stage, so a failed build went on to run the specs against the
previous binary.
Dependencies
- The Debian base image of the build container moves from
34cd9e9to
f324c7f. - The container build retries the apt.llvm.org key fetch for four minutes
instead of about 50 seconds. codecov/codecov-actionmoves to 7.1.1, and the CodeQL actions to 4.38.0.
v0.9.4
Fixed
- Templates dropped the indentation and the blank lines inside a
<pre>, so a
multi-line code sample rendered flat with its statements run together. A
%pre, a%textarea, a<pre>written as markup, and a filter body now keep
the whitespace they were written with, relative to the block they sit in.
v0.9.3
Hardening and testing
- Mutation testing, through
scripts/mutate.py: it changes one operator in the
library, rebuilds that translation unit, and runs the specs, so a mutant the
suite still passes names behaviour nothing asserts on. A weekly job runs a
larger sample against a floor, andscripts/mutants-equivalent.txtrecords
the mutations that change no behaviour, with the reading behind each claim. - The specs the survivors pointed at: paragraphs ending at a following list or
block quote, ordered lists starting at something other than one, empty list
items, emphasis closing against a multi-byte punctuation mark, reference
labels matched in another case, andscript,pre,style, andtextarea
blocks ending at their closing tag. - The spec suite runs under Valgrind's memcheck, through
scripts/valgrind.sh
and avalgrindstage inscripts/test.shand CI. Memcheck reports reads of
uninitialised memory, which neither sanitizer sees, and counts every
allocation against its free. - The code CodeQL flagged is fixed, and
scripts/codeql.shruns the same query
suite locally that the repository's security tab reports. - The GCC build turns on
_GLIBCXX_DEBUGthrough the new
BLOGIN_GLIBCXX_DEBUGoption, so an iterator used after its container
reallocated, two iterators from different containers compared, and a range
whose ends do not belong together each become a diagnostic. Every other build
keeps_GLIBCXX_ASSERTIONS. BLOGIN_WERRORturns-Werroroff for the one caller that needs it, the
mutation runner, which would otherwise lose a mutant to a parentheses
warning.- The CommonMark spec loader read the tab arrow as two bytes rather than three,
leaving a stray byte in every example that uses a tab. The conformance floor
is 624.
v0.9.2
Fixed
- A rebuild deleted the responsive image variants while leaving each page's
srcsetnaming them, so a site usingimage-widthsserved missing images
from its second build onward.
Changed
- Two posts claiming the same alias produce a warning naming both. The first
one keeps the alias now.
v0.9.1
No functional changes.
- Every GitHub Actions workflow runs read-only by default, and each action is
pinned to a commit rather than a tag that can be moved. - The development container pins its base image by digest and every package by
version, so a Linux build compiles against the same toolchain each time. - Static analysis through CodeQL, a published coverage figure, and an OpenSSF
Scorecard run, alongside the sanitizers, clang-tidy, and fuzzing already here. - Release binaries carry their build provenance attestation on the release
itself, so a signature can be checked beside the file it covers. - A security policy, at SECURITY.md.
v0.9.0
The first release. Everything below is new, so this section describes what
Blogin does rather than what changed.
Commands
blogin buildrenders a content tree to static HTML. A rebuild does only the
work the change requires and lands byte-identical to a build from scratch.blogin servepreviews the site on loopback and rebuilds as you edit, with
the open page reloading itself over a WebSocket. It builds into
.blogin-preview/, so serving never writes the directory you deploy.blogin initscaffolds a site that builds with nothing to fill in first,
againstnone,bootstrap5,pico, orbulma.blogin newwrites a post with its front matter filled in.blogin cleanremoves both trees a build can write and refuses any target
outside the site. Naming one with--outmakes it the only target.- Every option has a long and a one-letter spelling, and short options combine
as-fv.blogin --versionreports the version it was built from.
Content
- CommonMark, with GitHub Flavored Markdown for tables, task lists,
strikethrough, and fenced code. - Footnotes, reference links, definition lists, and attribute lists on links and
images. - Math and Mermaid diagrams, parsed into markup a client-side renderer draws.
- Shortcodes, with
youtubeandfigurebuilt in and ashortcodes/directory
for your own. - Front matter for the title, date, slug, summary, ordering, drafts, table of
contents, and redirect aliases. - Summaries from front matter, a
<!--more-->marker, or the opening block.
Templates
- A HAML engine with an expression language of its own: no assignment, no
user-defined functions, and no host language to call into. Anything outside it
is an error naming the file, line, column, and construct. - Layouts per section, by directory or by config.
- Themes, a directory of layouts and assets your own files override file by
file. cache-fragment, which reuses a rendered fragment wherever the values it read
are the same, so reuse cannot serve one page's markup to another.- Data files, JSON and a YAML subset, site-wide and scoped to a directory.
Output
- Atom, RSS, and JSON feeds, site-wide and per section, plus a sitemap,
robots.txt, and a 404 page. - Client-side search against a prebuilt index, with the script and its styling
generated by the build. - Taxonomies, with a page per term and an index, paginated like any listing.
- Optional extensionless URLs.
- More than one language, each built into its own subtree with translations
matched by filename.
Assets
- CSS and JavaScript minified, and assets named for a hash of their content so a
far-future cache never serves a stale file. - Responsive image variants with a
srcset, when an image resizer is present. - CSS framework profiles for Bootstrap 5, Pico, and Bulma, which class the same
semantic HTML without a layout knowing which framework is selected.
Platforms
- macOS through Homebrew, and Linux x86_64 and arm64 as statically linked
binaries that run on any distribution. - Windows through WSL2.
- Builds from source with clang on macOS and Linux, and with GCC 14 or newer on
Linux. - No runtime dependencies. Markdown, HAML, JSON, YAML, the asset pipeline, and
the preview server are all in the binary.