←back to thread

69 points jdkoeck | 2 comments | | HN request time: 0s | source
Show context
RadiozRadioz ◴[] No.44436831[source]
I think it would look a lot like XSLT
replies(1): >>44437322 #
righthand ◴[] No.44437322[source]
I 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.

replies(2): >>44437613 #>>44437781 #
monknomo ◴[] No.44437781[source]
That sounds interesting, and I'd like to hear more
replies(1): >>44437897 #
1. righthand ◴[] No.44437897[source]
Well 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

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.

replies(1): >>44544920 #
2. righthand ◴[] No.44544920[source]
Also the MDN docs are helpful for more templating functions and features. https://developer.mozilla.org/en-US/docs/Web/XML/XSLT