News for hackers. Stuff that matters.
Re:Minimum Viable Hugo – No CSS, no JavaScript, 1 static HTM... by schemescape on Monday February 27, 2023 @12:46PM (#34959512)
Yes, I also found it difficult to understand how Hugo worked internally.

If you’re ok with NPM, Metalsmith is a trivially simple static site generator, where you just write JavaScript code to customize it (and of course you can plug in templating tools). If you don’t like NPM, but like JS/TS, I started a port/rewrite of Metalsmith for Deno, I can share if anyone’s interested.

Re:Minimum Viable Hugo – No CSS, no JavaScript, 1 static HTM... by cxr on Monday February 27, 2023 @03:39PM (#34961565)
* * *
Re:Minimum Viable Hugo – No CSS, no JavaScript, 1 static HTM... by schemescape on Monday February 27, 2023 @11:17PM (#34965556)
Specifically, the internal Metalsmith-like core is here:

https://deno.land/x/[email protected]

Although I now see that I only documented in-code. It’s very similar to Metalsmith, except based on Deno, in TypeScript, async, and standarized on RegExp instead of a grab bag of globbing libraries.

Edit: generated docs link:

https://deno.land/x/[email protected]/mod.ts

Re:Minimum Viable Hugo – No CSS, no JavaScript, 1 static HTM... by roblh on Monday February 27, 2023 @05:36PM (#34962983)
Metalsmith is cool! I hadn't heard of it til now but it looks sweet.

I actually made something similar except mine isn't designed for static sites specifically. It just takes markdown, parses it into HTML (with code highlighting of course) and stores the html and frontmatter in an in memory sqlite database that gets rebuilt each time you save. Not the most efficient choice, but it makes plugging it into any front end framework like nuxt or next or svelte really easy, particularly if they have server side rendering. I guess it's almost halfway between this and PicoCMS. And you get full text search.