Show HN: Gutenberg – A static site engine as a single executable

(getgutenberg.io)

241 points | by Keats 2381 days ago

28 comments

  • sandGorgon 2381 days ago
    Hugo is written in go and does exactly this. Has a pretty large community and themes already.

    http://themes.gohugo.io

    • Keats 2381 days ago
      I'm aware of it, the majority of my static sites are still using Hugo since I haven't touched them for ages.

      The two features I really wanted when I started Gutenbrg were Sass compilation and syntax highlighting built-in: a clean build of my blog with Hugo + Pygments was taking ~20s for ~20 pages at the time and needed virtualenv for Pygments, Node.JS/npm for gulp-sass and the Hugo binary. Hugo now has syntax highlighting in Go so that part should be better though.

      Themes are supported in Gutenberg but there is only one so far as I didn't want to spend time on that yet. It is pretty fast to port themes though - took me about 10 minutes for Hyde: https://github.com/Keats/hyde - so I might port ~10 or so next week to get the ecosystem started.

      • dualogy 2381 days ago
        > with Hugo + Pygments was taking ~20s for ~20 pages at the time

        That's long! Glad I wrote my own in Haskell (and I'm a Gopher! just did it to get my feet wet in Hs) --- 92 pages in 1s (full rebuild; incremental is of course just a fraction) feels good to me now. http://github.com/metaleap/haxtatic

        No CSS magic tooling though. Just don't find vanilla CSS troublesome enough yet =)

        Edit: I saw you do ~10k pages in ~60s so guess we can see the Rust bonus there now --- certainly beats my extrapolated expected ~5-6k for the same time-frame. (Though I hope you were talking there about complex layouts with component-like-sub-templates / programmatic sub-renderers and date-time formatting, not just dumping-inner-markup-into-outer-markup =)

        • piranha 2380 days ago
          • dualogy 2380 days ago
            In Go, sure. In Haskell, for some app use-cases (and I believe static-site-gen is one such) it takes endless patience and tweaking to reach on-par performance with let's say "systems languages". There's scenarios where Haskell's lazy-evaluation may save a running program a lot of unnecessary work theoretically, but in practice I found there's not too many, compared to any eagerly-evaluated program written by a not-a-total-newbie-programmer. Certainly not such batch text-file processing. Then you'd easily parallelize your Go program wherever it makes sense, which in Haskell I didn't do but relied on whatever magic the compiler sprinkles in (if any) via compiler-options =)

            Also I'm having a rather excessive template system there!

            As long as it doesn't take 20s for 20p.. or I have to manage 10-100k-page sites..

      • smorks 2381 days ago
        hugo has recently started using a go-based syntax highlighter that's built in, called chroma i believe (https://github.com/alecthomas/chroma), which is supposed to be much faster than pygments.

        anyways, this project looks very interesting to me, i also currently use hugo for my static sites, but this looks much simpler, and the sass compilation is a nice feature too.

    • mi100hael 2381 days ago
      And Hugo is just a re-write of https://jekyllrb.com/

      It's the ultimate Magpie progression.

      Ruby -> Go -> Rust

      • alpb 2380 days ago
        I'm not sure how that's true. Do you have a reference on why it's a rewrite of Jekyll, or is it just because Jekyll and Hugo do the same thing and Jekyll was there before Hugo?
    • wwarren 2381 days ago
      More choices is not necessarily a bad thing
      • Walkman 2381 days ago
        Most of the time is just wasted effort. Yes, more ideas features, use cases, but I usually prefer one thing which is very high quality instead of a lot of small things which are never complete.
        • zanny 2380 days ago
          Its free software, and I can definitely relate to Keats that there are a lot of software projects I'd look at and think about participating in and just concede I don't want to work in my free time in whatever language its written in.

          Go is definitely one of those languages. My most definitions I have not given it the proper chance, but the lack of generics just turns me off as an avid user of C++ and Rust, in the same way Java has always turned me off for lacking functional features other languages have had for decades.

          For example, I've often thought about contributing webrtc peer support to various torrent libraries, but when I dig into them (libtorrent, libtransmission, libktorrent, etc) they are all 15+ years old codebases of either C99 or pre-C++03 C++. Considering I'm coming from Rust in my free time I know I would just drop the project within a week because of frustrations with the tooling and language.

          If I ever really wanted to go the extra mile, I'd use it as a learning experience for some of the Rust GUI bindings and write my own torrent library. Reinventing the wheel yes, but I'd rather spend right now a thousand hours in Rust than a hundred in a really old C code base. I imagine many of these developers like Keats feel the same way.

        • always_good 2381 days ago
          But you're making the wrong assumption that effort is fungible. That if something new didn't exist, that the effort would have instead happened on the old thing.

          I don't understand why people think this way since those same people certainly don't operate that way. It's just backseat driving how other people spend their free time. Just comes off as a circlejerk.

          • sundarurfriend 2380 days ago
            > backseat driving how other people spend their free time

            I like that phrase a lot, captures a lot about comments on OSS projects here in HN and elsewhere.

        • saghm 2380 days ago
          Just because you prefer other things doesn't mean it's wasted effort. Even if no one else used it (which isn't the case here), there's nothing wrong with working on a side project just to build your skills.
          • Walkman 2380 days ago
            that's totally different. You can do whatever you want in your free time as a hobby, or whatever reason, but I mean if it's not just for joy, and anything, and you want to solve a real problem, it would be better for everybody if you would just join to an already existing community and improve the thing already exists.

            So basically I don't find it a valid reason to make an entirely new thing because the existing solutions did not worked the way you wanted.

            • Keats 2380 days ago
              The issue with that reasoning is that according to you, everyone should just work on the first popular tool and never create a new one. People like different things and cramming all opinions into one thing, if even possible, usually don't work out.

              I mentioned it in another comment (https://news.ycombinator.com/item?id=15511028) but none of the things I wanted to change in Hugo could have been done.

    • toddmorey 2380 days ago
      I kinda hate the template syntax, though.

      Example:

      {{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}

      • Keats 2380 days ago
        Yeah, that's the worst part of Hugo by far for me. The default template engine is just terrible.
    • callmeed 2381 days ago
      Love Hugo but really wish it supported dynamic page generation like Middleman [0].

      [0] https://github.com/gohugoio/hugo/issues/140

    • ernsheong 2381 days ago
      Still, it's bring your own asset pipeline to Hugo, which is a pain. Middleman used to have it, but now its moving away from it.
      • HaoZeke 2376 days ago
        The general trend is to decouple the asset-pipeline and the site generators though... Except for the amazing jekyll-assets... Even for jekyll-assets though, it's often faster to run stuff through node-sass first. Also with npm scripts and yarn, the pipeline is exactly what you need and nothing else..
    • pwdisswordfish 2380 days ago
      Well title should be "Websiter generator No. 3487", so we wouldn't need to write such comments.
  • caio1982 2380 days ago
    Hey, just took a moment to tell you it takes courage to post a Show HN about whatever it is that you built. I understand the tone of most of the comments about Gutenberg in here, but... stick to your plan and just ignore them, congrats for pushing something out of the door :-)
  • forlorn 2381 days ago
    Could you suggest a more general purpose static site generator? 99% of them target blogs but most of times you need a bit more. Hugo looks like the most advanced of them but its documentation leaves much to be desired and doesn't include real-life examples of different projects.

    I'd love to have a tool to generate a catalogue, a simple journal, etc.

    • kot-behemoth 2380 days ago
      Have you had a look at Lektor (https://www.getlektor.com). It's from the creator of Flask, and is a static CMS implemented in Python. It goes beyond just simple blogging, and allows you to define models for any entity you want to store. It's extremely flexible. It also has a pretty decent UI for writing things in, and is Dropbox-friendly for non-tech users, too.

      The landing page explains the benefits quite well. Also, it has good examples of Lektor being used for a catalogue: https://www.getlektor.com/showcase/architekten-ronacher/ (direct link to the interactive version http://www.architekten-ronacher.at/projects/)

    • llccbb 2381 days ago
      If you want lots of customization and are friendly with Python I would suggest rolling your own project with Flask and Flask-Freeze. You get all the benefits of complete customization from URLs to templated pages and scripts. Really anything. While this isn't a canned solution, it is a really robust solution.
      • llccbb 2380 days ago
        Just to continue on...

        With this setup you can have anything (ANYTHING!) powering the data side. From CSVs to any SQL server local or remote, directories of markdown files, directories of ZIP archives, random (or deterministic) numbers or generable sequences.

        Flask gives you so much freedom with the backend implementation you can draw from anywhere. You just need to define the URL patterns and supply the functions that respond with HTML. Flask-Freeze then crawls your site (or a list of pages you specify) and renders the HTML with whatever function you supplied. Couldn't be easier to understand and it is unbelievably flexible.

    • vorpalhex 2380 days ago
      Metal. http://www.metalsmith.io/

      For sites which are closer to books, gitbook is an option as well. https://www.gitbook.com/

    • nkantar 2381 days ago
      You may be better served by Lektor: https://www.getlektor.com/
    • thirdsun 2380 days ago
      Middleman is still my favorite static site generator and it has exactly that in mind: General purpose website that may or may not feature a blog. If you're already familiar with ruby it's an obvious choice. If not, I'm sure there are countless alternatives.
    • Keats 2381 days ago
      Do you have an example of catalogue/journal that you would want to do? Gutenberg can do blogs but I originally built it for any kind of content: landing page, landing page + knowledge base, landing page + blog etc so it should work in theory.

      However, if your data is coming from an API/database something like Gatsby (https://www.gatsbyjs.org) would be better.

    • kaushalmodi 2380 days ago
      Have you looked at the Hugo themes and the tags on the right side?

      Here are themes tagged Portfolio: https://themes.gohugo.io/tags/portfolio/

      I actually find many themes that are non-blog based in there.

      • HaoZeke 2376 days ago
        A theme isn't exactly what's asked... Themes are just... A lot of work put into making an unwieldy system meant for blogging look like something else.
    • HugoBoss 2380 days ago
      Look into Wyam (https://wyam.io/). It has a concept of "recipes" which are in essence a custom static site generators themselves but which feed into the core Wyam engine.
    • mindB 2380 days ago
      I know I'm late to the party here, but I love Statik (https://github.com/thanethomson/statik) for this.
    • macandcheese 2380 days ago
      Vote for Middleman.
    • tmzt 2380 days ago
      I'm working one on, it's more of a static app builder though:

      github.com/tmzt/isymtope

      Working on a major push/update.

      • saghm 2380 days ago
        Genuine question: what does the term "static app" refer to? As I understood it, "webapp" explicitly refers to a site is not static.
        • tmzt 2380 days ago
          Very good question, and one I've been trying to answer in a concise way.

          Essentially it's "static" in the sense that it could be used to generate a fully rendered page that is also an interactive (javascript) application.

          It can also process actions on the server and generate a new HTML page in response to that that will be hydrated in the client.

          It's an attempt to give you the best-of-both-worlds with a SPA, but one that arrives fully-rendered so there are no delays loading content. It's an SSR approach but without using a javascript engine or framework on the server, the server-side component is completely developed in Rust.

          As far as "static app", I would say it's closer to something like Disqus being used on a static doc site or Firebase used for storage when github pages are used to host a site. It means it doesn't rely on server-side rendering to function as a PHP or ASP.net site does, but it can use it if available.

    • davidwtbuxton 2380 days ago
    • mitchtbaum 2380 days ago
      > a catalog, a simple journal, etc.

      Would you please describe the data model you have in mind a bit more?

  • stephen82 2381 days ago
    One thing it would get people's attention would be how much time a compilation test of 150K or more posts / pages would take to finish with Gutenberg.

    That is something we, users, have discussed with the Nikola team and it's something others have already discussed about it with other static website generators.

    Here's the discussion in case you are interested in: https://github.com/getnikola/nikola/issues/2842

    • Keats 2381 days ago
      I haven't really looked into performance that much yet but it is rendering one of my bench site of 10k pages in 61s on my 4 years old laptop. Gutenberg does load all posts in memory as well though so it's likely to run into the same issue.
  • bemmu 2381 days ago
    Pre-compiled binaries: https://github.com/Keats/gutenberg/releases

    Didn't notice those at first. Read the "installation" page, but jumped straight to the subheading "mac os x" and thought it was unavailable.

    Maybe you could have a"download for <Mac OS X/Windows>" button on the main page that would lead to the relevant binary for the visitor's platform.

    • ekianjo 2381 days ago
      > download for <Mac OS X/Windows/Linux>

      Corrected that for you Bemmu :)

    • Keats 2381 days ago
      Good idea.

      Hopefully someone will package it for Brew/Chocolatey (is that what is used on Windows?) but it's a good stopgap solution.

      • eradicatethots 2381 days ago
        I think most people are still just running installers on windows
  • dctoedt 2381 days ago
    My first impression was that this was related to Project Gutenberg; that might raise trademark issues.
  • corobo 2380 days ago
    I have a feeling the name will be drowned out with WordPress being in the same market and their new editor also being named Gutenberg
  • farhang 2380 days ago
    I do not honestly understand the negative comments, including the "Hugo did that already" since the dev points to important differences such as SASS.

    I very much look forward to testing the binary (not knowing Rust I see no reason to try to play with the code). Just one preliminary feedback: gutenberg --help does not indicate any options. But if I could make a suggestion that might help set this apart a bit from other markdown-site-generators, it would be to have real support for footnotes. Most seem to use the GitHub flavor which is sorely lacking in that regard and it's unfortunate that most generators do not address this vital need for many of us.

    Thank you for your work and for sharing this project.

  • leichtgewicht 2381 days ago
    The homepage misses how its different/better than all the other solutions. Rust ftw?
    • Keats 2381 days ago
      For my own usecase, Sass and syntax highlighting built-in are the things I wanted - Hugo now has highlighting built-in too though - and all of that in a single binary. I don't want to mess with virtualenvs or JS packages.

      Compared to Hugo (which is what I was using until then), it has:

      - the mentioned Sass compilation

      - a much better template engine (I'm a bit biased there since I also wrote it)

      - assets colocations: keep images etc next to the post

      I also find it much easier to use than Hugo but I wrote Gutenberg for my own usecase so this point would need external validation.

      I wrote a bit about the motivation when I released the initial version on my blog: https://vincent.is/announcing-gutenberg/ but I agree it should be better communicated on the landing page.

      Rust is an implementation detail: it could have been done in any language compiling to a binary, I just picked the one I prefer.

      • weberc2 2380 days ago
        This is cool, and props for scratching your own itch, but this does seem like an incremental/niche improvement over Hugo. I'm curious if you talked to the Hugo community about supporting those features? I don't mean to imply that you should have done so--"I wanted to build my own" is a totally valid reason not to bother.
    • spython 2380 days ago
      Cobalt static site generator is quite popular with Rust developers: https://github.com/cobalt-org/cobalt.rs
  • bojanvidanovic 2381 days ago
    Just moved from Jekyll to Hugo and I'm planing to stay there. BTW it's nice to see more alternatives to Jekyll coming on the scene.
  • dorfsmay 2381 days ago
    Ideally the perfect static site system should be a meta language, like one of the wiki languages, for which several solutions could be used to translate to HTML etc...

    We shouldn't have to rewrite our blogs every time a new cool programing language comes around!

    • kaushalmodi 2380 days ago
      Is this what you mean:

      I write my blog posts in Org mode. So I wrote this package ox-hugo that exports that to Markdown + the front-matter required by Hugo, in the folder structure for Hugo.

      Now I just write in normal Org, and don't worry about manually setting up the post front-matter -- https://ox-hugo.scripter.co

      (That site is generated by ox-hugo + Hugo btw :))

      • dorfsmay 2379 days ago
        Yes, although I'm not an emacs user.

        I've been trying to pick a "meta language", eventually given up but I cannot remember why, I need to pick it up again.

    • Kadin 2381 days ago
      I think that Liquid, the template language used by Jekyll and some other products, is designed to basically be that.

      https://shopify.github.io/liquid/

      The problem is that it's written in Ruby and therefore most implementations of it require you to have the whole Ruby dependency chain. That really increases its footprint on a cheap webhost, if you want the SSG to happen server-side (e.g. triggered by a Git hook).

      • Keats 2380 days ago
        Liquid is just a template engine, I don't think this is what the OP meant.
    • geraldcombs 2381 days ago
      The Website Meta Language has been around since 1996: http://thewml.org/. I used it to generate content years ago before more modern tools came out.
    • taneq 2380 days ago
      If only there were some form of Markup Language for HyperText that could be used to generate a static web page... hmmmmmm.
      • dorfsmay 2379 days ago
        HTML has become a presentation layer, it keeps evolving, and is too constraining to write blogs.
  • clintonb 2381 days ago
    Why should anyone use this over Jekyll or any of the numerous other static site generators?
    • Cthulhu_ 2381 days ago
      Jekyll doesn't work on Windows last time I checked, not without going through a long list of steps. It also needs a Ruby runtime.
      • Kadin 2381 days ago
        It does work on Windows, but it's a pretty unpleasant process, particularly if that's your only reason for installing Ruby (i.e. you aren't doing any actual Ruby development and just want to run the site generator).

        I was collaborating with a bunch of people on a website designed to use Jekyll and I got really tired of talking Windows users through the point of installing the whole Ruby environment just so they could generate content. It's a huge hurdle to have to get non-developer users over.

      • steveklabnik 2381 days ago
        It does work on Windows, and is fairly easy. It's true that it needs an entire Ruby environment.
        • WorldMaker 2381 days ago
          WSL at least makes it a lot easier to maintain the ruby environment and keep it up to date (especially for tracking GitHub Pages) as you can follow Ubuntu instructions. Jekyll is definitely my largest use for WSL.
          • steveklabnik 2381 days ago
            That's true. I don't use the WSL anymore though, still works.

            It is more annoying than something like Gutenberg would be though.

            • WorldMaker 2380 days ago
              Yes, for now the lazy convenience of being able to use GitHub directly as my "CMS" makes it worth the hassle to work with Jekyll and Ruby in WSL for those rare times when I need to do larger changes and make sure that I preview them locally.
              • HugoBoss 2380 days ago
                This is a huge advantage for Jekyll, as it makes it easy to add new content to my site from anywhere. I don't need access to my computer.

                I wish GitHub would support other SSGs in the same manner that GitLab does.

    • pathsjs 2381 days ago
      For one thing it is a single binary, which is much easier to handle than, say, jekyll, for people that do not use ruby
  • HugoBoss 2380 days ago
    A couple small feature requests:

    1) Can you add a guide to deploying on GH Pages, Netlify, S3, etc.?

    2) A search feature, along with a theme/example showing how to integrate it

  • Keats 2380 days ago
    I'll use the fact that people are watching this thread to ask for comments on how to handle i18n on the RFC (https://github.com/Keats/gutenberg/pull/111) as this is the next big feature I want to add.
  • laurent123456 2381 days ago
    As I'm familiar with PHP, I find it way simpler to just do `php somefile.php > somefile.html`, then I don't need to learn a new templating language and go around the quirks of a custom building tool. I guess it could make sense for somebody who doesn't know any other templating language.
    • _jal 2381 days ago
      Or for someone who considers PHP a bucket of suck and avoids it whenever possible. Or for someone who doesn't want the PHP dependency graph installed. Or who likes the conventions of this one better than coming up with their own or using some third-party PHP monstrosity with its own dependency graph. Or...

      There are many reasons different tools exist.

      • wolco 2381 days ago
        2011 wants its memes back. PHP has changed, if you still have the opinion PHP is a bucket of suck give it another try the tooling around php has changed so much not to mention the language amnd speed improvements.
        • _jal 2381 days ago
          Geez, people get touchy about their tools. I wasn't attacking PHP. I pointing out in passing that some folks feel that way.

          But no, I'm not going to look at new 'n improved PHP, because I don't care about it and life's too short. I only ever used it in a past life when doing contract work fixing other people's messes.

          • eberkund 2380 days ago
            That's rather ignorant.

            But if you'd prefer to stick your head in the sand and keep espousing your negative experience with PHP from many years ago despite numerous people advocating the many improvements that happened over the years then that is your prerogative.

            • _jal 2380 days ago
              Wow, what a bundle of assumptions and arrogance, all wrapped around abysmal reading comprehension.

              I might worry about responding again after you write something that replies to what I actually wrote, not whatever you apparently imagined. But honestly, likely not, given your attitude.

              • eberkund 2380 days ago
                I read everything you said and I didn't assume anything. It is fine to have no desire to learn modern PHP.

                Just don't then make opinionated statements in an abusive manner and expect to be able to contribute anything to a discussion on PHP as a development platform. I would have tried to address the points you brought up but the only thing you said was that PHP is a "bucket of suck" and something about dependencies.

                • _jal 2380 days ago
                  > but the only thing you said was that PHP is a "bucket of suck"

                  I feel like this is turning into a bad Monty Python sketch.

                  This is precisely what I have repeatedly pointed out: I did not say that I think PHP is a bucket of suck. I said some people hold the view while I was making a particular, different point. I was not making any sort of argument one way or the other about the quality of PHP or its fitness for any purpose, my technical-aesthetic preferences, or anything even vaguely related to your strangely aggressive misunderstandings.

                  You can read this, in context, by scrolling up a little. If you are incapable of reading and comprehending the plain meaning of my words upthread, I don't know what else to say.

                  • eberkund 2380 days ago
                    I guess that's one way of preventing yourself from being criticized; by presenting your viewpoints, shielded behind these imaginary people.
              • indigodaddy 2380 days ago
                After reading the little thread you were involved with, the lasting impression I come away with is that you were the only who needs an attitude adjustment, and that you see almost no value in any comments that others make that don't mirror your quite narrow views.
  • yoz-y 2381 days ago
    Is there any push to unify the way content is arranged so one could hop from one static site generator to another?

    I currently use middleman but I find it quite slow I might be tempted to go somewhere else but I am putting it away because even the migration from v3 to v4 of middleman took quite a while.

  • andrewmcwatters 2381 days ago
    There's a lot of me-too software out there, and honestly I wish that developers would just be more candid about their goals.

    What is this really? A state site engine with no dependencies... but is it? ...or is that just one of the things it is? If one had more plainly said "a static site engine written in Rust" then maybe it would be more compelling to at least one particular ecosystem.

    I just don't understand the selling point unless you're completely candid. Hugo is; it doesn't even pretend to be something it's not. It directly sells to people who invest in Go. And Jekyll has a powerful stance as being integrated with platforms like GitHub. What's the pitch here?

    • Keats 2381 days ago
      Why would an end user care which language the tool is made with? The only times it matters is if they want to contribute or if it requires you to install their toolchain, which is not the case here.
      • andrewmcwatters 2381 days ago
        It definitely has a larger impact with language ecosystems like Rust's and Go's.
  • johnsoct 2380 days ago
    This name is already an amazing typography library... http://matejlatin.github.io/Gutenberg/
  • seertaak 2381 days ago
    I have to say I don't really understand the point of these projects. Faced with the problem of generating a static part for my website, I just used Django to "print" the static part. I'm not saying you need to use Django (although in my case it has clear advantages, namely that you write everything using a single tool), but.... left pad, anyone?
    • BeetleB 2381 days ago
      >Faced with the problem of generating a static part for my website, I just used Django to "print" the static part.

      Because I don't want to spend too much time maintaining my site.

      When I used Wordpress, it got hacked. I don't want to check every few months for security updates.

      When I used Django, it would randomly "go down" when some library changed on my host. Then I'd have to figure out how to fix it. Which almost always involved upgrading to the latest Django, which was never straightforward.

      But the static site generator I have? Runs on my machine and not on a server. I still have the same problems with it as with Django (upgrades breaking stuff). The important thing is that it breaks stuff on my PC and not on the server. People can still access my site while my generator is broken. I feel no pressure to fix it (and indeed, it is usually months before I do fix it).

      And, finally, I think you don't really know what SSG's do for you. It's not about making one or a few pages static. It is about making it appear dynamic while being static (tag pages, categories, etc). In fact, I would invert the question. Given that a SSG can do pretty much anything a blog can do, why would someone use a server side process to write a blog? What's the point of having your blog in Django when a simple SSG will do the task for you?

      • seertaak 2380 days ago
        > When I used Django, it would randomly "go down" when some library changed on my host.

        I haven't had that problem. Django is alright IMO, if a little "heavy" on machinery. I'm not crazy about it, but it gets the job done and I do have a soft spot for python :)

        • BeetleB 2380 days ago
          >I haven't had that problem. Django is alright IMO, if a little "heavy" on machinery.

          It might help to keep in mind that I've had Django running on a server since around 2008. You can imagine that Django has changed a lot since then. Every year or two the site would go down as the host would change their Python libraries. So I'd need to update Django, which was always nontrivial if you're changing from a version that was a few years older.

          Perhaps Django is stable enough now that you can upgrade Django versions every 3-4 years and have it go smoothly. But not in those years.

          Arguably, you could say I should have had my own Python + Django + all libs installed in my user area and not have relied on my host's environment. Or used a Django friendly host that provides this to you automatically.

          At that point I'd go back to my question: Given that a SSG gives you a blog right out of the box, why should I even consider Django? I don't want to be constrained by hosts, and I don't want to have my own custom Python install for each site I host.

    • coldtea 2380 days ago
      >Faced with the problem of generating a static part for my website, I just used Django to "print" the static part.

      Sounds way more involved compared to what you'd do with just a static site generator -- especially one that's a single binary.

      • seertaak 2380 days ago
        The website is a commercial one which accepts payments and vends licenses (https://zenaud.io). So some kind of dynamic website is necessary. Printing to static html is a file (51 LOC) with a single function definition.

        I'm pretty sure just reading the docs on the Hugo or whatever takes longer than it took me to write the it :)

    • Keats 2381 days ago
      > but.... left pad, anyone?

      Actually, unless you're committing the wheels in your repo left-pad is more likely to happen with your solution than with a binary since someone could login and remove all versions of Django from Pypi (unless it's just yanking them instead of completely deleting them, not sure).

      On the other hand, you can just commit a binary in the repo and it will keep working assuming you don't change platform.

    • dualogy 2381 days ago
      Good starter project for learning a new language. You get to touch various interesting areas from IO to templating to a simple modicum of "dependency tracking" (for incremental rebuilds), many neat areas to learn/try optimizations, and now matter how hard it is at first or how deep down the feature-creep rabbit hole you go, at some point it's just gonna be done. Not a bad package
    • steveklabnik 2381 days ago
      > left pad, anyone?

      Crates.io is immutable (to the legal extent possible), and so that can't happen with this.

      • seertaak 2380 days ago
        Sorry, that comment was a bit flippant -- I have huge respect for the Rust language and community and agree that the left-pad-debacle is pretty unlikely to happen there.

        What I meant is that I consider static blog generation so simple that you should be able to do it yourself. I hope that doesn't come across as arrogant, above I allude to the fact that for my case, it took 51 LOC of python to get it done (admittedly harnessing the machinery of the existing, dynamic website).

        • steveklabnik 2380 days ago
          It's all good. Notably, it can't happen with npm anymore either, so maybe just not the best analogy to make ;)
  • HaoZeke 2376 days ago
    Please tell me there's some love for pandoc... I'm very confused though... There's no mention of the markdown parser being used... Pandoc is essential for cross-platform content (md --> doc, epub, pdf, html) and for MATH!!

    Sadly, only Jekyll and Hackyll have support for it... (many other smaller projects also might)

    Hugo with npm scripts does exactly thins...

  • quickthrower2 2378 days ago
    I now prefer knocking stuff up in my pet chosen MVC web framework. I can be more more productive when I need to tweak thing that way.

    With output caching performance should be on par with static. Or can use one of those programs that downloads a website to convert into static files if required.

  • cdevs 2380 days ago
    Do any of these static generators keep configs and themes with wherever you happen to upload your static content "example: github"?

    Just curious if moving from one machine to another if it's easy to download something like Gutenberg , clone your git and start working?

    • kaushalmodi 2380 days ago
      Once you get confident with your static site generator, you don't even have to download it or run it locally (not kidding).

      I have my Hugo-based blog on Gitlab (content, themes, config, etc).

      I just need to commit changes to my plain text content (Org/Markdown) -> Netlify sees the commit -> Runs hugo to generate the site -> Site gets published.

    • eberkund 2380 days ago
      Yes, they all work pretty similarly and the Git repo is fairly self contained. You (mostly) just point the generator software at the repo which includes your content, config and theme and it compiles it into HTML files.
    • shadedtriangle 2380 days ago
      Shameless self promotion but my static site tool Static-Fire is based off Git. Everything from the config to the python source to the articles you write is all in the same repo.

      https://github.com/cusiman7/Static-Fire

  • djcollier 2381 days ago
    Very nice, that is one of the most annoying things about Jekyll. I know i'm in the minority of users here who is on Windows, but setting up a Ruby in environment is a pain. Nice work, the site is also well designed.
  • eterm 2381 days ago
    Does anyone know why the page flashes when clicking "Docs" at the top, but not when moving to the "installation" link on the left hand side which is the same url?
    • ARCarr 2381 days ago
      Because the "Docs" link at the top goes to a blank page that then redirects you to the installation page.
    • Keats 2381 days ago
      The Docs link lands on the documentation section which redirects to the getting started section which redirects to the installation page.

      I could link directly to the installation page from the header, didn't think about it that much.

  • krick 2380 days ago
    I don't see a point right now, but just in case: how much of a hassle would it be to migrate my Hugo-based projects to Gutenberg, if it proves to be more useful somehow?
    • Keats 2380 days ago
      If you're using a TOML frontmatter it should be pretty painless for the content otherwise a bit annoying. Migrating the theme/template should be fast though.
  • groovy2shoes 2380 days ago
    No dependencies? Then what's all this?

        [dependencies]
        clap = "2"
        chrono = "0.4"
        toml = "0.4"
        term-painter = "0.2"
        # Used in init to ensure the url given as base_url is a valid one
        url = "1.5"
        # Below is for the serve cmd
        staticfile = "0.4"
        iron = "0.5"
        mount = "0.3"
        notify = "4"
        ws = "0.7"
    
    Not to mention the Rust toolchain!

    You and I must have different ideas of what constitutes a dependency ;)

    • fenwick67 2380 days ago
      They just mean their releases come as a single binary file, so really it's "no installation dependencies".

      This is remarkable in the static site generator world because many (jekyll, hexo, mkdocs) are modules installed via the language's package manager (jekyll is installed via "gem", etc). So you have to get the package manager working, then get any external dependencies working, THEN you can get started.

    • Keats 2380 days ago
      The output binary has no dependency. The dependencies listed and Rust are only necessary if you want to build from source.
      • groovy2shoes 2377 days ago
        I figured that's what you meant :)

        I apologize if I came off as dismissive or disdainful; I was in a sort-of playful mood when I wrote that, but moods don't usually survive internet transmission!

        It's a neat project. I myself don't have much use for a site generator of any sort, but I am interested in Rust (though I haven't had much opportunity to use it in the last year or so). I wonder: how are you liking Rust as a language? as an ecosystem? For a project like this, what advantages has Rust afforded? what disadvantages?

    • daemin 2380 days ago
      Yeah, based on the title I was expecting a single exe file (with themes and supporting directories) which would be more of a turn key solution.
    • scienceman 2380 days ago
      I think it might be statically linked binary, so downloading and running the binary has no installation dependencies.
  • dangom 2381 days ago
    Are there examples of pages generated with Gutenberg?
  • StevePerkins 2381 days ago
    So........ basically Hugo, for people who care that it's written in Rust rather than Go, and who don't care that there's no themes ecosystem?