5 ms·
So here's my question about static-site generators, such as the one that the linked site recommends. They seem fine for lengthy prose. You probably aren't goin
by azangru 4y ago
So here's my question about static-site generators, such as the one that the linked site recommends.
They seem fine for lengthy prose. You probably aren't going to write that many long-form blogs anyway — in the vicinity of several hundreds, maybe. After many years. So that's fine.
But what I've discovered about my writing habits is that I mostly tend to write short notes, about the size of a Hacker News comment. And those can easily number in thousands after several years of writing.
So how well is a static site generator suited for this? Do I want to build thousands of pages every time I start the site locally? I probably don't. But I can't find a reasonable static-site generator that will only build the requested pages locally, and build everything when deployed.
It's probably also silly to pre-generate a static html page for every such short posted note.
What's the most appropriate solution for such a writing pattern? Bite the bullet and set up a Wordpress or a Mastodon instance? That's a bit depressing.
- turmeric_root 4y agoI have a single HTML file with notes like this on my site. it's not the prettiest but literally no one else is going to read it anyways.
- underdeserver 4y agoNot sure it's that bad. Small, static text with minimal includes might be 300 bytes of overhead. What's the harm in having a few thousand of these?
- Brajeshwar 4y agoYou don't need to run and build the site every time. Jekyll crawls to a halt on my website if I build it locally when I write. So, I just write in Obsidian, iAWriter, or Sublime Text. The articles are sometimes un-finished, to-be-edited. I push them and Github does the magic. Now, replace Jekyll with any SSG and let a tool handle the build (Netlify, Vercel, CloudFlare Pages). For your specific tweet/comment like post, I remember deploying quite a few instances of something called "P2" from WordPress for internal department updates, team updates etc. WordPress P2: https://wordpress.org/themes/p2/ https://wordpress.org/themes/p2/
- pflenker 4y agoI do the same with Jekyll. I have tweaked my theme so that it looks great even on very short posts without title or image, and it works fine.
- scary-size 4y agoGot the same issue. Found those static site generators somewhat unwieldy to handle, especially for non-tech people. I worked on two different approaches: * A desktop app for creating static blogs, local preview, generates assets, optional deploy directly to Vercel. [1] * A cron job which reads the paragraphs of a Notion page. Currently only generates an Atom/RSS feed from each paragraph. Inspired by [2], currently no source available. [1] https://www.project-daily.com https://www.project-daily.com [2] https://brandur.org/atoms https://brandur.org/atoms
- mikojan 4y ago> So how well is a static site generator suited for this? Do I want to build thousands of pages every time I start the site locally? Take a look at Astro[1]. Astro comes with a development server and it will not build a thing unless you want it to. Also, in contrast to classic static site generators Astro relies on components instead of templates which reduces cognitive complexity dramatically (to me anyway). [1]: https://astro.build/ https://astro.build/
- azangru 4y agoYeah, I've been eyeing Astro, and wondering whether I like it or Eleventy more. What worries me about Astro is that its internals must be very complex, since it's trying to support all the component frameworks and libraries out there. As a result, I heard some complaints about unaccountable problems with my favorite component library, Lit. I am also very surprised that the choice between SSG and SSR mode in Astro seems to be all-or-nothing, rather than a configuration that would allow SSG-ing some pages and SSR-ing others. But yeah, its syntax, with an out-of-the-box support of typescript, looks more enticing than Eleventy's nunjucks or webc, or its serverless plugin. Good to know that Astro doesn't prerender all pages in dev mode either.
- jjdeveloper 4y agoThey now have an experimental flag that allows some pages to be SSR and others SSG. So this is now possible
- lucasdicioccio 4y agoThe way I've done it for my own notes (in a custom-made static-blog generator) is to have a template dedicated to "notes" and some over-engineered pipeline for similarly small datasets [1]. [1] https://lucasdicioccio.github.io/dhall-section-demo.html https://lucasdicioccio.github.io/dhall-section-demo.html