💾 Archived View for agnos.is › posts › html-version-live.gmi captured on 2024-03-21 at 15:12:45. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2024-05-10)

-=-=-=-=-=-=-

HTML Version Live!

Return to Posts

Published: 2024-02-15T20:42:38+01:00
Update: HTML fonts now changed to sans-serif, with dotted underline links.

Thanks to the power of the wonderful tool gem-web-cli, the HTML version of this website is now accessible!

https://www.npmjs.com/package/gmi-web-cli

This tool does 99% of the heavy lifting. It converts the gmi files in-place to HTML that looks pretty much like the native Gemini rendering does. I kept the basic style, because I think it looks fine. I may change the fonts around, as I'm not a huge fan of the serifs. The CSS is simple yet doesn't look entirely out of place in the modern world, and it is mobile-friendly.

Anatomy of the Website Generation

I integrated gmi-web into the repository's Dockerfile and the justfile that does all the templating and building. The gmi-web does not handle every link on the site, so some light application of sed was required to get all the links properly converted to their corresponding HTTP versions. The gemlog and individual blog posts have its own specific sed fixes, and additionally a "hostname fix" is applied across all pages on the site to make sure that any agnos.is links point to the HTTPS site and not the Gemini site.

This makes gem-web-cli the third main tool used in the creation of this site, along with gempost and tera-cli. The justfile has grown to 115 lines, which is still miniscule compared to writing a full application to manage this in a more specific/"elegant" fashion. I may reach that point anyway, though, as tera-cli has some very specific limitations that make it annoying to template the page files. Namely, templating pages requires kludging them into a YAML format so the tera CLI tool will understand how to template them.

I might wind up creating just a more general version of the tera CLI tool to fit my needs, rather than a full-on set of changes. But in any case, with the HTML version of the website available, the main goals of this project are now complete! The website will continue to evolve and be updated, but I think I can go a long way with the current setup.

Features of this Site

Working with the site is still pleasant:

License: CC-BY-SA-4.0.

‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗

Back :: /posts

Home