2 ms·
A while ago I created a simple website using an XML file as a storage technology and XSLT to render it to HTML. The data stored would be updated infrequently an
by ajxs 6y ago
A while ago I created a simple website using an XML file as a storage technology and XSLT to render it to HTML. The data stored would be updated infrequently and suited a consistent format, making XML suitable for the job. Originally the site index file pointed to the XML file and the XSLT was rendered by the browser. This worked perfectly for a long time. Even though there was some technology to learn, it was a zero dependency, browser-native solution.
After a few years I decided to make everything completely static to facilitate some changes. It now uses lxml in a Python script to perform the XML transformation. This is run by a makefile and produces static HTML, which is then uploaded.
My blog (https://ajxs.me https://ajxs.me) is rendered using a static-site-generator I built myself in Python. Using Python template strings stored in HTML files to create a simple templating engine. The blog entries are written in HTML format and stored in an SQLite database loaded by the build script. The final output is entirely static HTML, not even any Javascript.
I'm experimenting with different formats for writing the entries themselves in, however I haven't found anything yet that gives me more simplicity and control than HTML. The LaTeX to HTML conversions I've tried were way too bloated and messy, and markdown doesn't seem to support the level of control I want. With HTML I have very granular control over the final output in the browser and can create whatever arbitrary content I need to.