101 points · by lagniappe · 3y ago · 23 comments
If you do end up trying out bearclaw, you can use nginx or your favorite webserver. Earlier this week I made eclaire - a static site webserver with compression, caching, and automatic HTTPS through letsencrypt. https://github.com/donuts-are-good/eclaire
bearclaw.blog redirects back to source repo[0] on GitHub.
Should not it be a redirect to GitHub Pages site?
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. :-)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>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.
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.)
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.
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.
I do feel rather old when I see 3 megabytes described as tiny, though ;)
You can grab one of the binaries here [0] for your system, then put your markdown content in the markdown folder that bearclaw makes when you run it the first time. Bearclaw puts the html it generates in the output folder. If you want to, you can tell markdown to just keep an eye on the folder and it will generate the output as you make it, like if you have a webserver pointing at your output/ folder.
From there it's up to you, you can put it on github, or use your own server with nginx or apache or caddy.
[0] - https://github.com/donuts-are-good/bearclaw/releases/tag/1.1...
If your users run into one of the many string escaping bugs or get an unexpected error code from the file system, the program will not behave as expected and not detect the error either.