I ran my own blog for many years but recently I suspect my server got hacked, and after reinstalling I want to do things a little differently.
I’d like to move away from PHP and I don’t really need a dynamic CMS anyhow.
So far I’ve been using PicoCMS which serves content from markdown pages with a little header. I got quite good at it, wrote my own theme and a few plugins. The templating language is Twig so something similar would be a boon for me.
Writing content in markdown is my most important requirement, or rather reusing the existing pages with as little massaging as possible. Here is one example:
---
Title: Create WiFi Hotspot with NetworkManager
date: 24.11.2022
Tags: archlinux,android
template: post
---
# Make sure required depenencies are installed
blablablablablablablabla
I really want a tag cloud, which used to be my only sorting mechanism apart from date. Most generators, at first glance, offer a tags page. Honestly I have no idea if I’d have to template the cloud myself but tag functionality seems to be common, I guess?
What I don’t want is any sort of web UI or even builtin server functionality or other bells and whistles for the user. I prefer to ssh into the server and do things on the CLI.
Now my most important constraint is that I want to use what’s available in (or as a) Debian repositories. After a quick search around it boils down to:
Searching for similar topics I found this and this. I read all the comments.
TIA
edit: Lots of people mention Hugo. Why would I choose that over, say, Jekyll or Pelican?
Personally I feel drawn more towards Python than Go or Rust, and a Twig-like (e.g. Jinja) templating language. If that’s idiotic, please let me know why.
Also please remember I’m not running a github (or other similar VCS) page but have a dedicated VPS running Debian Stable. Deployment or containerization are of no interest to me.
Not sure if this will work for you but I keep my homelab documentation in markdown, mainly edited with Obsidian. I wanted an easy way to access via web and found Perlite. I have this pointed at a notes folder on my server which is auto-updated with Syncthing. No fuss, just works
I use quarto: https://quarto.org/
The big thing I like is that it has fulltext local search, built in and easy to enable.
Search is possible on hugo, but it’s not built in, you have to get a plugin, etc etc. Same for many other options you mentioned.
Heres my website: https://moonpiedumplings.github.io/
The search is nice, certainly a good thing to have in a blog. It has interesting features, most of which I’ll probably never use. No theming afaics but I’m sure that can be remedied. Your end result certainly looks nice enough.
Why would I otherwise sway from my hard requirements to use this? It is not in Debian’s repositories. However, a simulated install suggests that it has all dependencies bundled. What’s it really based on? Python I guess?
Quarto has theming via several built in bootstrap themes.
Quarto is written in javascript.
Also, it has no template engine/templating. I have a nasty hack where I write python code blocks (vua quarto’s ability to execute code blocks) to output markdown that can be remdered to both html and pdf, which is pretty unique. But this is probably not what most people making a website want.
11ty is my favorite! cross-platform, good defaults, built-in tag support, and just generally good learning curve.
I went the same direction, from WordPress to static site generation. I did the same evaluation as you are trying to do and ended up with Hugo, mostly because there is a lot of support available for it. My runner up was Pelican, because I was fluent in Jinja2, but I didn’t want to mess around with the templates and Hugo’s were prettier. Sue me, I am shallow.
The one regret I have about Hugo is that the templating language is challenging. I am trying to be as neutral as possible, but it seemed like even simple things were complicated to achieve. If someone would come up with a Hugo that speaks Jinja2, I’d be really delighted.
Other than that, conversion from WordPress to Hugo was relatively straightforward, despite needing to find a gallery component and converting menus. Hugo is indeed very fast in processing, which become important when your blog has thousands of articles.
I set up the blog as a private git repository. The server pulls from it, then runs Hugo and a full text search engine, and the content is visible and searchable within five minutes on update.
My runner up was Pelican, because I was fluent in Jinja2, but I didn’t want to mess around with the templates and Hugo’s were prettier.
I think you’re the first one mentioning Pelican. Apart from the theming, would you recommend it? I’m familiar with Twig.
needing to find a gallery component
Oh yes, that would also be relatively important to me. Again, does Pelican offer that?
There must have been a gallery component, since I only looked at generators that had one available.
Honestly, in hindsight the templates were really not a big deal. Just for fun, I tried converting the Hugo template I used to Pelican, and it was easy for me.
Pelican is solid and mature and I would use it, in hindsight. The only major flaws are that it’s much slower (but makes up for it with incremental builds) and that the community is much, much smaller. On the plus side, Jinja2 is much, much, much better than Go templating (Hugo borrows from Go).
I would also recommend Hugo, and believe it meets your requirements. The header markdown looks very similar to what you wrote, and it has tags. I’m not sure about a tag “cloud” the way you imagine it, but it’s worth looking into.
Isn’t it overkill? I’m also skeptical because it seems tied to the github universe.
And here’s what other people commented about Hugo:
- “It gets admittedly more complex if you’re wanting to write your own theme though.”
- “But as soon as you do want to customize it, you’re stuck learning one of the most esoteric languages that wasn’t meant as a joke.”
- “The documentation is unclear and there’s a chicken and egg problem about how to learn Hugo.”
There’s also Zola
Why would I choose that over my requirements? C’mon, just throwing names isn’t enough.
What templating language does it use?
I use Publii, which is a local application that supports markdown pages, has an interface similar to a CMS, and renders the entire site out to static
html
files that you upload to any web server. It can dump to a local folder, orftp
the files for you. It has a lot of good themes, and a blank theme that you can use to get started if you want to roll your own like I did.Why would I choose that over my requirements? It’s not in Debian repos.
Also I seem to remember from reading the comments in other posts, that this is a GUI app? Does it even use Markdown files?
If you’re into GNU/Guile Scheme, there is also Haunt: https://dthompson.us/projects/haunt.html
GNU/Guile Scheme
What is that?
Why would I choose Haunt over my requirements? It’s not in Debian repos.
Astro may also be worth looking into if you’d like a SSG that is still capable of rendering some dynamic content
Interesting. Big Names.
It’s based on some js framework, right? Probably pulls in Gigabytes of dependencies.
Why would I choose that over my requirements? It’s not in Debian repos.
I like Hugo, though it’s been the only one I used. May get too involved, and some themes have features others may not have, for example, comment integration may not exist for some themes.
That’s usually fixable with templating. What sort of comment integration? Some third party I guess?
Self host and third party exists. You probably could use Lemmy as a shoddy way to make comments too
Self host
On a static site generator? Can you link me to that please?
What about Hugo’s templating language? It’s been said to be daunting:
- “It gets admittedly more complex if you’re wanting to write your own theme though.”
- “But as soon as you do want to customize it, you’re stuck learning one of the most esoteric languages that wasn’t meant as a joke.”
- “The documentation is unclear and there’s a chicken and egg problem about how to learn Hugo.”
I was fighting with my linter tbh still have no clue how to write html in go like its php
And, for the comments part, I haven’t looked into it, it’s likely just a JavaScript file that connects to your server or an external one and pulls all data and whatever, its the single dynamic part and it’s done with js
wrtWith regard to all I specified, why?“wrt”?
“with regard to”
I thought that might be what they were saying, but then it would be “with regard to to” so I was unsure.
Initialisms like this bug me because they cause confusion for the most minimal amount of benefit.
I was hoping to find an answer the original question in this dialog.
https://blog.cubieserver.de/2020/adding-a-tag-cloud-to-my-hugo-blog/
Fast, secure, bundled how you want and integrates easily with caddy and git runners.
https://docs.gitlab.com/tutorials/hugo/
Also is easily run in a container locally and deployed to a VPS or anywhere you like. Uses native markdown and is still actively developed.
I’m skeptical because it seems tied to the github universe.
And here’s what other people commented about Hugo:
- “It gets admittedly more complex if you’re wanting to write your own theme though.”
- “But as soon as you do want to customize it, you’re stuck learning one of the most esoteric languages that wasn’t meant as a joke.”
- “The documentation is unclear and there’s a chicken and egg problem about how to learn Hugo.”
What do you think?
Hugo. Most definitely. I use it for 5 different sites. The syntax is easy. Posts, pages, etc are in easy markdown. Compiles your site (directly to your web root if you like) in under a second. It’s awesome.
This is a post near and dear to my heart. I too am looking for something markdown-centered, static, reasonable for code/technical content and that can embed not just photos but browser-side js graphs based on data within the markdown or REST calls. It’s been a few years since I went down this rabbit hole and I got lost very quickly. Thank you for posting, I’ll be revisiting over the next few days to see what the fediverse has to say!
You may want quarto. It is explicitly designed for data science and related usecases, and has ample support for the graphs those usecases need.
I use sphinx with Myst markdown for this, and usually plotly express to generate the js visuals. Jupyterbook looks pretty good as well
That sounds pretty great - do you have a link to your site using this?
Unfortunately not, here is a little kitchen sink type demo though https://myst-nb.readthedocs.io/en/latest/authoring/jupyter-notebooks.html
Myst-nb is probably the place to start looking btw - forgot to mention it in previous post
@A_norny_mousse@feddit.org Personally, I use Zola. It is written in Rust and my understanding is simpler/more minimalist than Hugo. They are not in the official repo, but they do have a .deb package on Github https://github.com/barnumbirr/zola-debian (main page: https://github.com/getzola/zola) and they have a forum in case you have questions.
Thank you! instead of the deb package or building it myself, I just downloaded the lastest from their github. It is one executable, and seems to be working fine so far. Not saying it’s my choice, but it’s easy enough for a quick test and the templating language looks very familiar.
Also curious, have a similar project in mind. I’ve tinkered with jekyll a little and heard good things about Hugo. Hopefully people can speak to some of these.