← Changelog

0.7.0 — colorful code on every site, customizable per site

Code blocks get real syntax colors that follow each site's modes, and any site can swap in its own.

Why Care?

LFM parses Markdown into a tree that each site renders itself, so Astro’s built-in Shiki never sees those code blocks and they came out one color. Putting highlighting here means one package update reaches every site, with no theme to copy around.

What’s New?

  • highlightCode(code, language) from @lossless-group/lfm/highlight.
  • A default palette for every site. Fixed hues take their lightness from the site’s text color, so they follow light, dark, and vibrant modes with no setup.
  • Per-site colors. Set --lfm-code-token-keyword and the other variables in a site’s theme CSS. The README lists them all.

Under the Hood

  • The output carries CSS variables and no fixed colors, so modes switch instantly.
  • A browser without CSS relative colors shows plain text rather than breaking.
  • The parser’s own import doesn’t load Shiki.