simple static site generator

4 min read Original article ↗

mkws

simple static site generator

Quickstart

On a Linux machine, in a terminal:


curl mkws.sh
| tar -xzvf -

mv ws.sh example.com && cd example.com
echo "hello, world" > index.upphtml
bin/mkws https://example.com

Binaries for OpenBSD also available

Read The Full Docs

Features

  • Small Just ~30 lines of sh and ~400 lines of C!
  • Powerful Uses sh code as a templating language!
  • ️Extensible Can use any UNIX utility in its templates!
  • Zero Config Script your static site generator instead of configuring it!
  • No package manager Just download and start hacking!
  • Optional JS Add JS to your project only if you prefer!

Built with mkws

  1. dflund.se
    dflund.se
  2. dflund.se/~getz
    dflund.se/~getz
  3. rustredriver.com
    rustredriver.com
  4. lowdata.codeberg.page
    lowdata.codeberg.page
  5. www.andrewjvpowell.com
    www.andrewjvpowell.com
  6. markbucciarelli.com
    markbucciarelli.com
  7. iorgos.net
    iorgos.net
  8. iryansh.net
    iryansh.net
  9. sherman.codeberg.page
    sherman.codeberg.page
  10. adi.onl
    adi.onl
  11. t.mkws.sh
    t.mkws.sh
  12. mkws.sh
    mkws.sh

What people are saying

  • kalviter
    kalviter
    customised it to autogenerate a /blog page for me and an RSS feed. Not only is it by far the ssg I feel most empowered with, it's taught me lots about writing shell scripts and it makes a very pretty website. nice job with i
  • hkt
    hkt
    I love it. I've wanted something like this ever since nanoblogger died. Cheers.
  • mbucc
    mbucc
    Thanks for making mkws!
  • BenWibking
    BenWibking
    That sounds beautiful
  • ervin
    ervin
    OK, super tiny and simple. This looks like a nice alternative for the big ones like Jekyll or Hugo.
  • Dight67
    Dight67
    I like it a lot
  • Arafel
    Arafel
    I was just thinking about looking for something like this only a hour ago. I hate front end web dev. I'll be using it for a django project I'm working on if it suits. Thanks.
  • jmbenfield
    jmbenfield
    Simple & clean, nice job. I love the description btw: "simple static site generator", no fluff just straight to the point lol.
  • j3s
    j3s
    [...]i am a HUGE fan of mkws![...]
  • Apos
    Pretty cool! Never realized I could use single quotes in HTML.
  • vord
    This is super cool! It looks like it'd be great to tie in with some of my existing scripts.
  • cibiliciceanu
    cibiliciceanu
    mkws is a very pleasant surprise! I migrated from Hugo, because I wanted something simple, straightforward and minimal. And boy, do I love this!😁Thanks for building it! 🙏
  • Raphael_A_Bauer
    Raphael_A_Bauer
    sh as static site generator? Turns out you can create a decent static site generator with basic Linux commands and a couple lines of code. Impressive.
  • carsten
    carsten
    Finished playing around with mkws. Nice generator. Fast and easy to use. I even managed to get markdown integration.
  • kiraemclean
    kiraemclean
    Looks super cool thanks!! I’ll check it out.
  • oxalorg
    oxalorg
    mkws looks really interesting, I'll check it out :D
  • jlj
    jlj
    Finally started playing around with mkws, @adi@twtxt.net! Lots of fun! :-)
  • lohn
    lohn
    I can’t express how happy I am to have a decent shell SSG. You are now truly one of my heroes.
  • hrcerq
    hrcerq
    hmm cool
  • pekman
    pekman
    very cool
  • eklausmeier
    eklausmeier
    mkws is to be considered a proof-of-concept
  • mckinley
    mckinley
    The best parts of mkws are the simplicity and the ability to tweak the script for your use case. Putting everything in one binary or adding a bunch of extra features like a web server would add unnecessary complication.
  • eldersnake
    eldersnake
    mkws for mine is both small and minimal, but not remotely limiting, and packs a punch because sh works surprisingly well as a templating language.
  • proycon
    proycon
    mkws uses shell scripting as templating, which is not a syntactic improvement
  • citizen428
    citizen428
    Love the idea of mkws! Together with a class-less CSS lib like new.css this seems like a great way to get some content online fast and efficiently.
  • teddydd
    teddydd
    Wow, such simple yet useful idea. Great job! yes [...]I’d like to have it packaged for Void Linux[...] :)
  • morgangeek
    morgangeek
    [...]great work [...]! I was looking for something as simple and extensible as mkws, after trying other static site generators like hugo, zola, ... often great but too difficult to customize
  • tomolt
    tomolt
    I like the general idea. The more I think about it, shell script is sort of a natural fit for templating.[...]Your code is great. It's very concise and only does what it needs to do.
  • augmentedtree
    augmentedtree
    All kinds of nope. Dynamic typing being the preference of web devs is bad, but stringly typed is insanely worse.
  • Booty_Bumping
    Booty_Bumping
    Wrong tool for the job. Edit: looks like this entire thread came to the same conclusion
  • deleted
    deleted
    What the fuck? Is that supposed to be a feature?
  • bhaak
    bhaak
    Could it be that you misspelled "nanoc"?

Contributors

How to contribute

Make a web site 😉 and send a link to i@adi.onl!

You can also sponsor me: