News for hackers. Stuff that matters.
Re:Bearclaw – tiny static site generator with RSS by linsomniac on Sunday February 26, 2023 @10:44AM (#34946370)
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, 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.

Re:Bearclaw – tiny static site generator with RSS by jxf on Sunday February 26, 2023 @07:39PM (#34951521)
> 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:Bearclaw – tiny static site generator with RSS by linsomniac on Monday February 27, 2023 @09:15PM (#34964823)
Thank you, that description is very helpful and clarifies some things in how the "layout" in the frontmater influences the page.