Match the theme's post thumbnail sizing, float and excerpt length

The front-page/blog listings rendered featured images as 150x150
centre-cropped squares stacked above the text. The theme actually
renders them at 210x150 cropped from the left-top corner
(set_post_thumbnail_size), floated left with a border so the excerpt
wraps beside them -- the CSS for that (#container .attachment-thumbnail)
was already ported, the class just was never applied.

The left-top anchor matters: every featured image is a 930x354 slide
banner whose subject sits in the left portion, so a centre crop cut the
subject out entirely.

Also restores the "Read the Rest..." link (the theme's excerpt_more
filter) and corrects excerpt length -- the theme uses 60 words on the
front page and 30 in the slideshow; the export was baking WordPress's
default 55 for both.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 19:22:38 -04:00
co-authored by Claude Opus 5
parent 9b6e5a91bf
commit 289a5b3118
9 changed files with 19 additions and 27 deletions
+3 -1
View File
@@ -95,7 +95,9 @@ async function exportPostType(conn, postType, destDir, { attachmentPaths, thumbn
let excerpt = fixLiteralNewlines(row.post_excerpt || '');
if (!excerpt) {
const plain = html.replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim();
excerpt = plain.split(' ').slice(0, 55).join(' ');
// 60 words: what the theme's front-page loop sets ($sbExcerptLength = 60).
// The slideshow truncates this further to 30 at render, as the theme does.
excerpt = plain.split(' ').slice(0, 60).join(' ');
}
const frontmatter = [`title: ${frontmatterString(row.post_title)}`, `slug: ${frontmatterString(slug)}`];