A couple days ago, my friend tendermario sent me a message:
I honestly want to make a md file sorta layout that gets converted into html and just static serve on github pages
Now I know there are a lot of ways to accomplish this, but I didn't create any of those, so by the doctrine of not-invented-here, I made Simple Site. The name probably already clashes with something existing, and I'm open to changing it as soon as a better idea comes along.
The main concept was to see if I could produce a static site generator in less than 100 lines of shell script. Obviously there is some cheating involved: it uses markdown to produce the actual html that is inserted into the html files, but I've built a few niceties around that, and it comes with a GitHub workflow that publishes it to GitHub Pages.
Here's a non-exhaustive feature list:
SITE_ROOT
if you want to host it at different URLsh1
of markdown file)That's about it, for now. I don't think I'll add much more. The site you're currently reading this on was generated using this project. Maybe I'll add a footer.
Using it is very simple, and that's kind of the point. The README
might explain it more but here's
the gist:
./css/base.css
./markdown/
(make sure to include) index.md
files if you
want index.html
files in each directory../js/main.js
./fonts/
./env
to set SITE_ROOT
, SITE_TITLE
, and CRUMBS
markdown
./convert.sh
./_site/
from wherever you feel likeWhen I test it locally I do this:
SITE_ROOT="/" ./convert.sh
cd ./_site/ && python3 -m http.server
Oh, and it's GPLv3 licensed, so feel free to do with that what you will.
— Mitch