The image render hook converts the JPEG, PNG and WebP images to WebP in
several widths (480, 800, 1200, 1600 px, no wider than the original) with
srcset and sizes matching the layout. All images get their dimensions
(no layout shift) and are lazy loaded, except the first one of the page.
GIF and SVG images are served as-is.
The images downloaded by the pages go from 99 MB to 13 MB (desktop) or
8 MB (mobile), and the site from 168 MB to 101 MB.
The social image partial no longer reads the .RelPermalink of the page
images, which published all of them, and compares the images by name
since the content now refers to the processed variants.
Refs #11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNHsWYTXPThURz6TbVS1j3
The content now uses standard Markdown, rendered by render hooks
(layouts/_markup):
- images: , rendered as a figure when the
image is standalone (replaces attachedFigure and screenshotOf)
- links: resolved to a page resource (replaces attachedFileLink in
links), to a page of the current site or of the other site with a
language flag (replaces internalLink and relref), and relative links
are made relative to the site root (they were broken in RSS feeds)
- code blocks: ```yaml {filename="x.yaml" hl_lines="3"} or
{title="..."} (replaces highlightFile, highlightWithTitle, highlight)
The content was converted with scripts/convert-shortcodes.py, which can
also be used on the drafts. The attachedFileLink shortcode is kept for
the URLs in code blocks, as well as embeddedVideo and youtube.
The generated HTML is the same, except:
- figures are no longer nested in paragraphs (invalid HTML)
- the screenshots of tweets get an alt text
- the language flags are removed from the summaries
Closes#13
Refs #11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNHsWYTXPThURz6TbVS1j3