• Zarobi@aussie.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    23 hours ago

    That nginx thing looks pretty cool! Very neat (if using nginx).

    In the second half you’re talking about dynamic imports right? Like fetching the html with JS and then loading that? I try and avoid doing that for various reasons

    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      14 hours ago

      In the second half you’re talking about dynamic imports right? Like fetching the html with JS and then loading that? I try and avoid doing that for various reasons

      I think I get you? No JS involved, no dynamic requests from the client side. Opening the page in a browser, you’d just see the one page request which arrives fully formed looking like static html.

      If you mean my scripting and emmet comment, I just meant to script the creation of the static html then serving it. But not like programmatically, more like for file in ./blogs/$(date -I).*/*; do cat $file >> ./blogs/$(date -I).serve-me.html; done or something (probably more rigorous than that, but that kind of mix of convention is semi automated hackery). I find non-commercial web pages don’t really need to change very much, so I’ll often just copy a header and footer into a file and fill in the middle manually. But I actually enjoy writing HTML. :9

      I also try to avoid JS unless there’s something I really want to do with it. And then I like to offer a <noscript> alternative.