↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Migrating from Hugo to Astro

The author is moving an 11-year-old blog from Hugo to Astro after finding Hugo’s revamped template system hard to manage. The migration keeps the same design, but rewrites generated components, page logic, the RSS feed, head metadata, and blog post handling.

Reading notes
#

  • The blog has already moved from Jekyll to Hugo, and this migration to Astro is the third platform change.
  • The design has never changed, and the author treats that as part of the site’s identity.
  • The author chooses to port everything, including many pages beyond the blog posts.
  • Hugo’s updated template system broke local listing pages, and the author describes the problem as personal inability rather than a fault in Hugo.
  • Astro and Bun are used for the new setup, starting from the blog template.
  • Template components, styles, and frontmatter-related logic are moved first, but the migration quickly turns into page work as well.
  • The RSS feed needs custom logic so external publication posts point to their canonical external URLs.
  • The head element contains most of the site-specific complexity, including canonical URLs, robots metadata, social metadata, favicons, and stylesheet selection.
  • Blog posts stay in markdown, but the author adds Astro content collection schemas to type the frontmatter fields.
  • Some earlier shortcode-based choices now feel like tech debt, and the author plans to replace temporary components later.
  • The full migration takes about three days, similar to the previous migration.