12 votes

mkws - A simple static site generator

12 comments

  1. [7]
    adi
    Link
    Hi all, I felt tired of the JavaScript landscape and build a simple static site generator. Its templates are shell based. Please let me know your opinions! Thank you!

    Hi all,

    I felt tired of the JavaScript landscape and build a simple static site generator. Its templates are shell based.

    Please let me know your opinions! Thank you!

    3 votes
    1. [6]
      vord
      Link Parent
      This is super cool! It looks like it'd be great to tie in with some of my existing scripts. I could hack together a comments section that you have to submit via email. Not that it's a good idea,...

      This is super cool!

      It looks like it'd be great to tie in with some of my existing scripts.

      I could hack together a comments section that you have to submit via email. Not that it's a good idea, but it's fun to think about oddball stuff that would be much easier with access to the rest of my shell compared to other static site generators.

      I've got various alert scripts for systems in bash. Run this near the end to generate a detailed report, and send out the link via SMS when there's an emergency.

      2 votes
      1. [5]
        adi
        Link Parent
        I'm actually considering running pp under CGI at some point. Sort of like a small PHP.

        I'm actually considering running pp under CGI at some point. Sort of like a small PHP.

        1 vote
        1. [4]
          vord
          Link Parent
          LOL, that was my first thought. Pretty sure it's a security nightmare to do that. Most of those languages spent a lot of time trying to prevent making random system calls, not make it easier. But...

          LOL, that was my first thought.

          Pretty sure it's a security nightmare to do that. Most of those languages spent a lot of time trying to prevent making random system calls, not make it easier.

          But it'd be some quality rube goldberg fun. Do it and warn people to never expose it to the internet.

          1. [3]
            adi
            Link Parent
            Running it inside a chroot with handpicked binaries would make it safer.

            Running it inside a chroot with handpicked binaries would make it safer.

            1 vote
            1. [2]
              vord
              Link Parent
              Oh most definitely. I'd probably keep it fully containerized in podman. Like a 1960's hotrod... a deathtrap environment-murdering machine, but oh so fun to drive.

              Oh most definitely. I'd probably keep it fully containerized in podman.

              Like a 1960's hotrod... a deathtrap environment-murdering machine, but oh so fun to drive.

              1. adi
                (edited )
                Link Parent
                Wouldn't compare it to a deathtrap. 😛

                Wouldn't compare it to a deathtrap. 😛

                1 vote
  2. eldersnake
    Link
    I use this regularly and as someone comfortable in the shell, it still kind of surprised me how well shell can be used as a templating language.

    I use this regularly and as someone comfortable in the shell, it still kind of surprised me how well shell can be used as a templating language.

    3 votes
  3. [4]
    teaearlgraycold
    Link
    Where's the source code for this? The .tars don't seem to include it. Ironically at only a few hundred lines including the full source code in the docs wouldn't be unreasonable. And there's no...

    Where's the source code for this? The .tars don't seem to include it. Ironically at only a few hundred lines including the full source code in the docs wouldn't be unreasonable. And there's no better documentation than the actual code you're running.

    2 votes
    1. [3]
      adi
      Link Parent
      https://mkws.sh/docs.html#sources Not a bad idea to include the sources in the docs.

      https://mkws.sh/docs.html#sources

      Not a bad idea to include the sources in the docs.

      3 votes
      1. [2]
        teaearlgraycold
        Link Parent
        The first link there just seems to have a Makefile, manpage, and a binary

        The first link there just seems to have a Makefile, manpage, and a binary

        1 vote
        1. adi
          Link Parent
          That binary is a shell script 🙃. It counts as sources.

          That binary is a shell script 🙃. It counts as sources.

          5 votes