4 ms·
I think it would look a lot like XSLT
by RadiozRadioz 1y ago
I think it would look a lot like XSLT
- righthand 1y agoI got into XSLT after the HN grug brain article last week. It is wonderful and I have my whole site (100 pages/files) migrated in less than an hour (w/o using LLM) and have it served off a 4 line caddy file. Seriously browsers just need to adopt XSLT 3.0 and stop all this wheel reinvention already.
- LegionMammal978 1y agoEh, I also thought that at one point (regarding XSLT 3.0), but it turns out that parts of it are an underspecified mess. E.g., you can specify static parameters to be supplied to the document, but it has nothing on when or how any type-conversion errors would be signaled [0]. And in general, it has very imperative features like shadow attributes that purists would turn up their noses at. I don't see it becoming widespread anytime soon. [0] https://github.com/Paligo/xee/issues/32#issuecomment-2762343209 https://github.com/Paligo/xee/issues/32#issuecomment-2762343...
- monknomo 1y agoThat sounds interesting, and I'd like to hear more
- righthand 1y agoWell it’s all in a single directory: ``` static/ js/ css/ log/ my-post.xml my-post.xsl index.html ``` Caddyfile: ``` :8080 try_files {path}.xml {path}.html file_server { index index.xml index.html root static } ``` XSLT work is all based off of a repository someone wrote with a grug brain explainer: https://github.com/pacocoursey/xslt https://github.com/pacocoursey/xslt The next step is to generate all of the `static` dir from markdown files and probably a new markdown-like format for registering templates to generate xsl/xml files for special html blocks and template parts or generating blog listing pages.
- righthand 1y agoAlso the MDN docs are helpful for more templating functions and features. https://developer.mozilla.org/en-US/docs/Web/XML/XSLT https://developer.mozilla.org/en-US/docs/Web/XML/XSLT