4 ms·
I got really frustrated with Hugo yesterday when I couldn't add a page with just a list of all my posts on it. I spent a few hours playing around with a bunch
by linsomniac 4y ago
I got really frustrated with Hugo yesterday when I couldn't add a page with just a list of all my posts on it. I spent a few hours playing around with a bunch of different options, Hexo seemed to come the closest to something I could fire up and just drop my existing markdown in (though it did blow up on a youtube embedded player I had in one post).
Bearclaw does look super simple to get going, but seemed to be missing a few things I was hoping for:
- No real documentation, so I copied my markdown files over.
- Ran bearclaw and put the output in a web accessible location.
- Went there and there was no index.html (though "home" on the "posts" page seems to link to it).
- The "posts.html" page just has filenames, so it doesn't seem to pick up the frontmater.
It's definitely leaning in the direction I was looking for, but maybe a little too far. :-)
- mikae1 4y agohttps://github.com/piranha/gostatic https://github.com/piranha/gostatic & https://github.com/getzola/zola https://github.com/getzola/zola are two other single binary alternatives.
- linsomniac 4y agoThanks for the pointers, I tried them both. Gostatic is super simple, but probably too simple. It's quite a step up in power from Bearclaw, and has all the parts to be able to make a good blog, but the parts are all pretty basic and if you want anything very fancy you're going to have to custom build it. Think "main page is <ul> of page titles and date". Also didn't seem to have a way to specify a base URL so everything needed to be at "/" in the resulting site, a little tricky for testing. Zola looks like a good fit, almost as simple as gostatic, but with a lot of templates (though many kind of stale, many I couldn't get working, but I think the template largely dictates the install, so switching between themes really is a bit of work). Hexo looks like the quickest way to a fancy looking site, though it is more effort than Zola. I'd lean towards Zola.
- jxf 4y ago> I got really frustrated with Hugo yesterday when I couldn't add a page with just a list of all my posts on it. I know you weren't asking for solutions but I'm surprised to hear this. That should not only be trivial but is something that ships by default when you init your site. For example this should be enough on your list page: <ul> {{ range .Pages }} <li> <a href="{{ .Permalink }}">{{ .Title }}</a> </li> {{ end }} </ul>
- michaelmcdonald 4y agoI took it to mean not a list of post _titles_, but a full output of posts on a single page (a la DaringFireball). I tried to do the same not that long ago (was just starting to toy around with Hugo) and could not find an easy solution to it.
- linsomniac 4y agoThank you for the suggestion. When I was searching for solutions, I got a lot of snippets like yours, but I couldn't for the life of me figure out how to turn a snippet like that into a page on the site. The best I ever got was a markdown page that was a copy of the "about.md" page, but I couldn't get that to show anything but static content. I created this 3-4 years ago, hacked on it some to get it where it is, which I tried not to be too crazy. But maybe I just munged it up somehow. Maybe I just need to start over again with the latest Hugo and get brained up. Hugo has nice documentation, but it fairly quickly goes from "put a few markdown pages here and run hugo" to "read the rest of the book". Which is probably just the nature of the beast.