1. 14
  1.  

  2. 14

    Most of the static site generators don’t seem to generate “sites”. They instead generate “blogs”, with the concept of posts and pages very deep-rooted in the implementation.

    I mention because I recently came across statik which is a static site generator written in Python which really lets you generate sites. You get to define the “models” which you’d like your site to have (if you define Post and Page models, you have something like pelican). Imagine Django, but compile-time (for the lack of a better analogy).

    I might write a blog (heh) post on this later, but I would definitely suggest checking it out if you’re interested in static sites.

    1. 6

      I maintain 3 websites, two with Jekyll (https://monix.io and https://typelevel.org/cats-effect/) and one with Middleman (https://alexn.org).

      Both Jekyll and Middleman are perfectly capable for static websites. The blogging part is just a nice built-in feature.

      1. 4

        I’ve been using Nikola (edit: for my landing page), because at the time it was the only one that had incremental builds. You have to follow their guide to reconfigure it for a non-blog setup: https://getnikola.com/creating-a-site-not-a-blog-with-nikola.html

        VuePress has my interest now, especially once Netlify support is implemented.

        Edit: I also have Sphinx instances: one as a public wiki and the other as a private notes repo.

        1. 4

          The handful or so that I have worked with all support defining models, Sculpin and Tapestry (i’m the author) call them content types, Jigsaw calls them collections. All three can be used to generate a static site, but for convenience (and likely because the usual users are minimalist bloggers) they come “blog aware” which simply means they have a blog collection configured out of the box.

          I have used all three and a few others such as metalsmith (which also supports collections via plugin) for the purpose of generating small static sites with a handful of pages for clients as well as reasonable sized multi author blogs.

          TL;DR, yes some SSGs come shipped with blog content types (models) pre-configured but that doesn’t make them only good for generating blogs.

          1. 2

            This is interesting. I wish it didn’t use YAML though.

            For the website, I ended up making a custom generator, and focus on blogs in most generators was one of the biggest reasons, even though not the only one.

            1. 2

              Most of the static site generators don’t seem to generate “sites”. They instead generate “blogs”, with the concept of > posts and pages very deep-rooted in the implementation.

              Bravo for saying this. I’ve faced the same problem, with static generators forcing me to give an author / date setting for each page. This might make sense for blogs, but doesn’t for the simple site I want to build.

              And most of them force you to do things a certain way; it is so painful, which is no wonder people just go back to Wordpress.

              Amy Hoy wrote a great article on this : https://stackingthebricks.com/how-blogs-broke-the-web/

            2. 6

              No mention of Pelican? Meh.

              1. 5

                Do you have any experience with Pelican? Will you tell us about it?

                1. 5

                  My blog runs on Pelican. So far it’s been a good experience. The greatest selling point for me was support for per-category (though not per-tag) Atom feeds. It’s a regrettably rare feature, but if you plan to ever add yourself to blog aggregators, or simply give readers an option to filter out the kind of stuff they are not interested in, it’s really nice to have.

                  1. 3

                    Yes. A good thing about Pelican, among others is that it doesn’t require a gazillion dependencies and just works.

                    I also recommends https://github.com/spanezz/staticsite because it doesn’t force a filesystem layout or HTML contents or markdown formats on you. Contrarily to other generators, you can use it to improve an existing “handmade” website without having to start from scratch.

                    1. 2

                      My blog has been on hiatus since my most recent child, but another benefit of pelican is that it also is one of the last homes for ReStructuredText holdouts.

                      I also found the hooks for adding logic/post-processing to be painless.

                  2. 6

                    If you’re looking for an excuse to learn Haskell, there’s also Hakyll, a static website generator built with Haskell and it’s pretty nice: https://jaspervdj.be/hakyll/

                    1. 3

                      Hakyll sure does seem to be the go-to static site generator for Haskellers or people interested in Haskell, but I’ve found it to be somewhat complex, at times needlessly so.

                      I’d recommend checking out Slick (successor to SitePipe), built on top of the Shake build system. There’s also yst but I haven’t had a close look at it yet.

                    2. 5

                      I made my own custom one in 241 lines of Python + 162 lines of templates of HTML and Atom.

                      It does not have some features most have like lazy compilation but is still plenty fast for me.

                      It has some features other usually have not, like per page summaries, explicit inclusion of pages into blogs, TweetThis blocks, and non-Javascript social media buttons.

                      The older parts of my website are still running on Ikiwiki but I really like the simplicity where I know and understand all the code.

                      1. 4

                        I’d hoped to see them compared for day-to-day usage. Is there a reason I should choose one over the other?

                        1. 2

                          Similarly skimmed the article hoping for that. I’ve been a fan of middleman for ages, but made my personal blog use wintersmith since it seemingly would let me be a bit more freeform in having different templates and organize each post in it’s own folder.

                        2. 4

                          Like federico3, I was disappointed to not see my preferred static site generator included. For me, that’s Gutenberg, which follows a fairly similar model to Hugo but has an (imo) much better templating language—basically just Jinja2 or similar.

                          I recently switched from Hugo to Gutenberg and wrote a blog post comparing the two, in case anyone is interested in some speed benchmarks: https://www.codesections.com/blog/gutenberg-vs-hugo/

                          1. 3

                            pkg_locate doesn’t find any of these. It does, however, find pelican and my own, sblg. I’ve also heard a lot about Roman’s ssg.

                            1. 3

                              I have noticed a number of topics being posted recently that are relating to static site generation so I thought I would share a link to the site that first got me interested.

                              1. 3

                                Although this site is built and maintained by Netlify, it seems to use publicly available/verifiable data and not have a particular bias toward generators that work well with Netlify’s software.

                                1. 2

                                  It’s refreshing to see, isn’t it? I know from Netlify’s point of view it provides an avenue of contact with their target market; but in also being open source it is providing a good public service that is verifiable in its neutrality.

                                2. 3

                                  I’d like to see a list of static site generators that build sites that don’t require JavaScript, granted with some it’s just a question of a theme without js.

                                  Currently https://www.romanzolotarev.com/ssg.html for me.

                                  1. 4

                                    Thank for using ssg.

                                    P.S. ssg is getting pretty stable, but still I’m not ready to make it a standalone project. Just one of my shell scripts. ;)

                                    1. 3

                                      You can filter the list at staticgen by any language, any template scheme or any license. It includes a number of ssg’s that do not require JavaScript.

                                      Then again @romanzolotarev’s ssg is beautifully minimalist something I both love and admire and if that does the job for you then I say keep with it.

                                      I just noticed Roman’s ssg is not listed on staticgen, it should be.

                                      1. 4

                                        Hi Simon, thanks :)

                                    2. 2

                                      I wanted to read this but immediately upon loading the page, some marketing thing covered it up and I couldn’t figure out how to get rid of it within 3 seconds, so I closed the browser tab instead.