Writing your own static website generator

(x3hy.github.io)

15 points | by 3hy a day ago ago

9 comments

  • gregopet 6 hours ago ago

    Please don't write your own. Last time I checked there was just an astounding number of static site generators in every imaginable technology. Why do people write & publish this thing over and over again, surely it's been done to the death?

    • floydnoel 31 minutes ago ago

      I wrote my own because there wasn't one that did what I wanted. And why shouldn't I? We are hackers, yes?

    • Matumio 5 hours ago ago

      For the joy of building your own thing?

      People also keep knitting clothes despite how cheap they are to buy. They solve math problems that have been solved before, to get better at math, instead of starting with an unsolved problem. They write about things they are enthusiastic about, maybe to remember the experience, maybe to get better at writing, or to dip their toes into publishing.

      Some people also seem to like reading such articles, given the upvotes. I guess it's about sharing the experience of something that interests you. Learn how it might turn out.

  • mguerville 21 hours ago ago

    I'm a non engineer, never-coder but fairly technical guy and about a year ago I had Lovable.dev write me a static site generator because I understood the value of it to host cheaply/freely and thought it'd be a good exercise. It takes .md files with a basic YAML frontmatter and publishes just the blog part (each .md file is blog post) of the site, but it was a good learning process and I think most people don't understand how simple the web can be when the goal is to publish content efficiently.

  • ColinEberhardt 17 hours ago ago

    I created my own static site generator about 10 years ago. It was only around 100 lines of code:

    https://github.com/ColinEberhardt/tiny-ssg

    I used it for a few websites, viable replacement for Assemble and other SSGs of that time.

  • jiffygist 10 hours ago ago

    Text is too small on mobile

  • pwdisswordfishs 20 hours ago ago

    > Bloated file sizes due to javascript libraries for lazy loading data.

    Use of JS, including the NPM-backed bloat you see in libraries used on the modern web, is orthogonal to whether a site is on a static host or not—which is what "static website" actually refers to.

    For examples, see: a bunch (most?) of the stuff hosted on GitHub Pages.

    > Nowadays every page you see is always using fancy technologies and "modern" UI that looks like unicorn barf.

    ... says the person responsible for authoring/publishing a post exhibiting some of the worst decisions I've seen for styling a Web page all week.

    • iammjm 14 hours ago ago

      What specifically do you dislike about OPs website?

      • lloydatkinson 11 hours ago ago

        For me it’s the font. I don’t enjoy reading prose in a code font.