{
  "path": "/3mgxwsamjek2f",
  "site": "at://did:plc:yexcapfkucnqipkpedpx2lyi/site.standard.publication/3mddz2yx3ys2x",
  "tags": [
    "Html",
    "Web",
    "Dev"
  ],
  "$type": "site.standard.document",
  "title": "HTML Templates... The Journey Continues",
  "content": {
    "$type": "pub.leaflet.content",
    "pages": [
      {
        "id": "019ce93b-9556-744b-85bd-7f6881439e86",
        "$type": "pub.leaflet.pages.linearDocument",
        "blocks": [
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "I'm looking for a way to use HTML templates. There is no real way. HTML doesn't yet have this feature. "
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "The closest might be server side rendering web components because they're part of the platform and resemble templates in a sense. JSX can be used similarly but is not part of the platform. HTMX with it's focus of locality, therefore markup and extending the platform has a similar goal. MDX is almost exactly right, except serving markdown files isn't the way to go."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": ""
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Today I learned about HTMLx by purely thinking: \"is there MDX but for HTML?\" and that looks great and was proposed by Rich Harris of svelte fame but that was 7 years ago and I guess never caught on. "
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": ""
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Chris Coyier from Codepen has opinions on this as well and clearly it's something a lot of web developers think about. "
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "I guess I'm going to try using lit-ssr since syntactically that looks right and feels like writing HTML. We'll see how it goes and maybe there will be part 2 to this post later. "
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": ""
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "See comments for updates."
            }
          }
        ]
      }
    ]
  },
  "description": "Musings on HTML templating",
  "publishedAt": "2026-03-13T22:14:12.678Z"
}