tag : astro

    Jun 2, 2025

    Today I finished migrating an existing Wordpress site i have been running over to Astro.

    There was nothing especially interesting about the site - it’s a basic community web site with information and contact details. It’s main feature is being able to view the monthly published PDF newsletters.

    Previously I would be emailed the PDF, and then go manually go through a short workflow of extracting a cover image from the PDF in order to display it on the site. Then I would create a new post to contain the PDF, and update a few fields of metadata.

    Nothing fancy, but slightly tedious.

    With the new version of the site, those manual steps have been eliminated.

    What I have now is a script which will read each PDF in a folder and extract from it a cover image and a few key paragraphs of text.

    The extraction from the PDF itself is slightly ridiculous, but then PDF is itself an ‘interesting’ file format.

    In broad terms, what I ended up doing is defining bounding Rectangles onto selected pages of the document where the image or text I need exist.

    Once the data is extracted, it is then placed within the sites filesystem as images or JSON, ready to be picked up by Astro for display.

    Previously, the dynamic wordpress site was hosted on its own (small-ish) linode server - running nginx, PHP, and mysql.

    But now, the new Astro site is entirely static, (cheekily) hosted on github pages, and fronted by Cloudflare.

    Quite a reduction in resources!

    May 28, 2025

    After seemingly an eternity of fiddling, i finally moved this site from hugo to Astro.

    Why? Hugo is great at what it does, but one thing I found lacking was the ability to interleave interactive javascript, one thing Astro excels at.

    The conversion hasn’t been that straightforward. Astro is no-where near as batteries included as Hugo.

    Tags? Had to roll that myself. Pagination? Not quite implemented yet, but again custom code.