6 Commits
Author SHA1 Message Date
jamespandClaude Sonnet 5 efa372b231 Redirect old WordPress ?page_id=/?p= links to their new paths
Both sites used WordPress's default plain permalinks -- no
permalink_structure was ever set -- so every inbound link anyone has
bookmarked, linked from another site, or has indexed in search is of the
form ?page_id=N or ?p=N. Without a redirect those all land on the
homepage with no indication of where the content went.

scripts/export-wp.mjs now also writes redirects.map: a full ID -> new
path table for every published page/post (not just the ones referenced
from other content, since any of them could have outside inbound links),
in the "id path" format Apache's txt RewriteMap wants. Regenerated on
every export run alongside the content itself.

The :443 vhost looks up page_id/p from the query string against that
map and 301s to the resolved path, stripping the old query string.
Unmapped IDs (deleted pages, a stray revision) fall through to the
homepage rather than a bare 404. The redirect target is host-relative,
so it works correctly under any ServerAlias this vhost answers for
(including the still-dormant www.vicidial.com/vicidial.com aliases,
with no changes needed once DNS is eventually pointed here).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 20:50:31 -04:00
jamespandClaude Opus 5 873dcc1892 Expand [caption] shortcodes instead of emitting them as text
WordPress expands shortcodes at render time via do_shortcode(), so the
raw post_content the export reads still contains them literally. All ten
[caption] instances were being written straight into the Markdown and
rendered as visible markup -- the Hosting page led with
[caption id="attachment_205" align="aligncenter" width="300"].

They now become the same div.wp-caption / p.wp-caption-text structure
WordPress produces, which the ported theme CSS already styles. The
shortcode is swapped for a placeholder before the HTML->Markdown pass and
rebuilt after, so the image inside stays Markdown and still goes through
Astro's image pipeline rather than being frozen as raw HTML pointing into
src/assets, which would not resolve at runtime.

[caption] is the only shortcode in use -- no gallery/embed/video/audio.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 19:39:12 -04:00
jamespandClaude Opus 5 73399911cc Rewrite WordPress cross-page links to site-relative paths
Content linked between pages using absolute WordPress URLs -- 100
occurrences across 39 files, many against wp.vicidial.com, the old
WordPress backend host that won't outlive this migration, the rest
against www.vicidial.com in ?page_id=N form.

The export now resolves those IDs against the published page/post set and
emits /slug (or /blog/slug) instead. All 100 resolved; links to
vicihost.com are a separate site and deliberately untouched.

Verified every internal href in the built output corresponds to a page
that actually exists -- no broken links.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 19:33:45 -04:00
jamespandClaude Opus 5 63c2f6c0e7 Preserve the line breaks that space out page sections
Page content separates its major sections with leading <br><br>, which
the old site renders as a blank line before each section heading. Those
breaks were being lost, leaving every section butted up against the
previous one.

Two causes. The content contains malformed `</br>` closing tags, which
browsers treat as a line break but an HTML parser discards, so they
never survived the HTML->Markdown conversion; they're now rewritten to
<br />. And Markdown drops a hard break at the start of a paragraph, so
turndown now emits literal <br /> tags instead of the trailing-two-space
form -- inline, with no trailing newline, since a lone tag on its own
line starts a raw HTML block (CommonMark type 7) and would stop the rest
of the paragraph being parsed as Markdown at all.

Verified against the live old site: paragraph count, <br> count, bold
heading count and per-paragraph break placement now all match exactly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 19:29:39 -04:00
jamespandClaude Opus 5 289a5b3118 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>
2026-09-15 19:22:38 -04:00
jamesp dcff6c7b5a Initial Astro migration of vicidial.com off WordPress
Static brochure/marketing site: 55 pages, 5 posts, 82 attachments, and
the 7-item nav, exported from the wordpress_vicidial DB via
scripts/export-wp.mjs (re-runnable). Layout/styles ported from the
small-business WP theme; homepage slideshow rebuilt as a Splide client
island pulling the latest 5 posts at build time, replacing the old
BJQS jQuery plugin.
2026-09-15 18:12:06 -04:00