• PokerChips@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    1 day ago

    I’m looking into static generated sites again… (never created one professionally), how do you handle forms without passing it off to third party?

    I have interest in zola but wondering if anyone has hacked it to allow some backend manipulation. I know it kind of defeats the purpose but interested in some minimal backend use cases.

    I guess you could pass off to something like backend(.) mysite(.)com

    • I Cast Fist@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      1 day ago

      I might sound like a caveman stuck in 1995, but… Aren’t forms just “send this info back to the server”? If your form points to an appropriate page you own (fill-the-form.php -> validate-form.php -> success.php), there’s no 3rd party involved.

        • The_Decryptor@aussie.zone
          link
          fedilink
          English
          arrow-up
          2
          ·
          9 hours ago

          Static sites with things like CGI “endpoints” were a thing back in the day. There’s no need for URLs to have a 1:1 mapping to the filesystem, you can have a half static and half dynamic site if needed.

          • codeinabox@programming.devOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            5 hours ago

            I’ve been thinking about this, and I do think it’s a great form of degradation. I would love to see more sites that are statically rendered, but under load dynamic features are removed.

          • Colloidal@programming.dev
            link
            fedilink
            arrow-up
            1
            ·
            6 hours ago

            Yeah, but then it’s not static anymore. Your hosting options change, your threat model changes, it’s a whole different game.