I use Cloudflare Pages to host my website
With SSI, your template for every page would basically look like this:
Making your own SSG is another good solution. They're easy to make, and you can tailor them to your own particular needs.
#include "templatestart.html"
#include "tenplateend.html"
Eventually a combination of wanting faster speed and NIH syndrome made me write my own that did significantly less parsing and processing.Then I built that into a live update system I called TCUP (torstenvl's content update program).
It was a fun project, and ended up being the first non-trivial program I wrote (I was 17-18).
Quite simple to start, and a nice system to add some scripting and styles without the requirement of bringing in a framework.
I think a hundred or so well-chosen lines of your favourite scripting language can do wonders. Mine is ~300 lines of Bash because I over-engineered a thing or two for kicks. The core of it is maybe 50 lines.
[1] https://github.com/adityaathalye/shite
The README documents the architecture and rationale. Maybe it will help you figure out yours. Happy hacking!
So you only really need bottle and markdown in your requirements.txt, and around 100ish lines of code. Maybe a little more if you want to upload the results to Cloudflare directly (for which I’d use requests).
You can rinse and repeat that with aiohttp and markdown if you want the async flavor (which is what I’d do these days if I hadn’t already “finished” mine).
And, if you’re into LISP… https://github.com/rcarmo/sushy might make for some fun reading.
Cloudflare page for deploying Next.js static site:
https://developers.cloudflare.com/pages/framework-guides/nex...
On the sidebar they provide a ton of other guides for different generators, too.
cat header.html body.html footer.html > page.html
??
It's there, it works, and it's totally simple. I don't have to do any maintenance or worry about hosting or a domain name.
Images go into my Flickr account, and I save a copy of each post's text, in case I ever want to do something else. But not so far. Been on Blogger since 2009.
Are you married to markdown or is HTML markup sufficient[1]? Because just using a single 5-line web-component is sufficient for a shared header/footer on each page.
I have a tiny web-component that does this (the shortest I saw in the wild is a 5-line one). Lets you do things like this:
... content ...
[1] Although markdown does let you include verbatim HTML, so you can use web-components directly within markdown too. A 2-line bash script to call pandoc to turn markdown into HTML is sufficient.
files := $(patsubst %.md,%,$(wildcard *.md))
all:
for f in $(files); do \
pandoc -s -o $$f.html --template=website.html $$f.md;\
done
Just writing simple software feels way better than reading docs for an arcane tool that will change on you over time due to updates.
As others have said, this is a perfect fit for SSI. You could also deploy a simple php page (just using php as a template engine with server side/host support).
I've experimented with m4 for something similar in the past.
I would probably recommend going with Hugo, though:
https://discourse.gohugo.io/t/solved-using-html-for-content-...
https://gohugo.io/getting-started/quick-start/
An article from 1997 on using m4 and make - would strongly recommend just using php cli these days...: https://tldp.org/LDP/LG/issue22/using_m4.html
For rolling your own in php, see:
https://rosswintle.uk/2021/12/hang-on-php-is-a-static-site-g...
All questions I have, are solved by ChatGPT, e.G. adding "_small" to jpgs.
{{ $newImageURL := replace .Params.image ".jpg" "_small.jpg" }}
so I don't need to learn or remember Hugo API.Quite recently I've added jamstack to reduce image sizes etc. to make the site faster.
Plumbing is a bit obfuscated, not sure I've written it down anywhere. I write/edit files in obsidian or emacs. The obsidian sync feature copies those to a pi5 which also runs obsidian. That stashes whatever is in the directory into a fossil repo as a backup / sync to other machines mechanism. Something runs make periodically to rebuild the site which gets copied back into obsidian and thus ends up back on whatever device I'm using to edit the files.
A simpler setup would involve committing markdown to a github repo and having a cron/make somewhere pull from that, rebuild the site, commit to the same or a different github repo.
Soupault is more geared to the use of external tools and plugins, which can make it more complicated. But if you already know the tools you're going to hook up to it, it's easier in the end.
Flask with jinja, then you just do {% extends layout.html %} etc. It might be overkill but it's not that hard
Feel free to clone this repo: https://github.com/cpach/piper
PHP. That's literally the one thing it does well. You should still use a framework (is Slim Framework still a thing? It's small, if it is) for routing and escaping but as long as your header and footer are pure HTML then you can just include them.
Also I guess since I'm a Ruby dev a lot of Jekyll stuff made sense to me pretty quick.
DX is great.
In most cases, ships absolutely zero JS to the client, meaning super fast load times.
https://so.dang.cool/blog/2024-01-22-DSG-Dumb-Site-Generator
It's free.
(disclaimer: it's one of my side projects)
I never hear people talk about it, and it’s perfect.
It can get complicated, but at the end of the day it’s just markdown to html.
all you need is some setup and a git repo the rest ist done for you and unless you host traffic heavy content it will most likely be free forever.