Live data from Hacker News

Show HN: Bearclaw – tiny static site generator with RSS

github.com

21–25 of 25 posts

Re: Show HN: Bearclaw – tiny static site generator with RSS

#21
post #16

I'm definitely going to have a look at this. I was just comparing hugo, soupalt, jekyll and zola for a tiny geocities-ish blog site, and will add that to the list. I do feel rather old when I see 3 megabytes described as tiny, though ;)

Have a look at https://bearblog.dev

Re: Show HN: Bearclaw – tiny static site generator with RSS

#22
post #15

Earlier quoted context omitted.

> 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: {{ range .Pages }} {{ .Title }} {{ end }}

Thank 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, whic…

> 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.

Completely understand. If this is helpful, the way Hugo works (and the way many static site generators work) is that you make a template for each kind of page that you want to appear in the final output. A typical blog might have, say, three templates: a template for the homepage (show a quick bio and your most recent posts), a list template (show all your post titles and links), and a post template (show one post at a time).

When you generate the site, your content will be processed through the templates. For a typivally sized personal site this happens in under 100ms.

In Hugo, when you initialize a new site, these templates will already exist for you, so you won't have to write them, though you can of course edit them. (The out of the box defaults also include other kinds of things you might or might not care about, like tags or categories.)

Re: Show HN: Bearclaw – tiny static site generator with RSS

#23
post #19

Earlier quoted context omitted.

I 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.

Wouldn't that be similar to the parent comment, but outputting `.Content` in the range loop?

Yes, you got it.

Re: Show HN: Bearclaw – tiny static site generator with RSS

#24
post #13

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 missi…

https://github.com/piranha/gostatic & https://github.com/getzola/zola are two other single binary alternatives.

Thanks 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 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.

Re: Show HN: Bearclaw – tiny static site generator with RSS

#25
post #22

Earlier quoted context omitted.

Thank 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, whic…

> 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. Completely understand. If this is helpful, the way Hugo works (and the way many static site generators work) is that you make a template for each kind of page that you want to appear in the final output. A typical blog might have, say, three te…

Thank you, that description is very helpful and clarifies some things in how the "layout" in the frontmater influences the page.
Post reply on HN