8

Using a static site generator at scale

over 4 years ago from

Hey fam,

I was curious if anyone is using a static site generator at scale? I'm considering options for a magazine I'm working on that'll have daily or weekly stories with an archive and was wondering if a static site like Jekyll or something like that would be a better option than Wordpress.

16 comments

  • Marc EdwardsMarc Edwards, over 4 years ago

    If you want a static site generator that handles tons of pages, Hugo is an amazing option. Our site isn’t that big, but here’s some stats for you: 273 pages, 1211 static files, total build time of 1545 ms. Yep, the entire site is generated in less than 2 seconds. Hugo is phenomenally quick.

    Smashing Magazine is built using Hugo, too. They’ve published 2137 articles. Note that Hugo is also generating pages for tags and other things as well, so their total pages is probably way higher. I believe they were using WordPress prior to Hugo.

    What’s best? I personally love Hugo, and the concepts behind static site generators, but honestly, WordPress, Ghost, Jekyll, Middleman, or many of the other options can work well. Even though Hugo is incredibly fast, I don’t think build time should be the deciding factor — there’s many ways to automate builds, and if you’re going to place a CDN in front, then you’d have to factor in time for it to propagate anyway.

    10 points
    • Joe Blau, over 4 years ago

      Another vote for Hugo. I had a static site that I use to run that hosted all of the git documentation[1]. After bootstrapping the site had over 24,000 pages which finished compiling on my iMac in under a minute. Jekyll was so bad that it ran for a day before I killed the job because it never finished.

      [1] - https://github.com/dvcs/gitdvcs.com

      1 point
      • Marc EdwardsMarc Edwards, over 4 years ago

        Whoa. Great to hear it can churn through 24,000 pages without an issue. I wonder if there’s a way to get it to do partial builds, too? Not that it matters when it’s so quick, but it could be handy for some projects.

        Hugo Server does partial updates… I wonder if there’s a way to hook into that?

        0 points
  • Bugsy SailorBugsy Sailor, over 4 years ago

    I'm pretty obsessed with Hugo. Blazing fast.

    I'm not sure what you mean by "at scale", my largest Hugo build generates ~700 files and deploys live on Netlify in about 2 minutes.

    I find it to be way less convoluted than Gatsby. No plugins and great tools out of the box. Currently there is ONE single issue that still has me looking for other solutions, which is generating content from external data sources (https://github.com/gohugoio/hugo/issues/5074)

    I've also been using it for my latest sunrise project. And here's a film festival I run that uses Hugo.

    Along with Hugo I use IMGIX for image hosting and Algolia for search. Additionally, I'm running and hosting all of this for free, other than IMGIX which starts at $5/month.

    However, I did want to pose the question a few days ago, "If I don't use React, am I still a developer?" however Designernews is not the place for that conversation.

    3 points
  • Matthew BlodeMatthew Blode, over 4 years ago

    Jekyll is pretty great but if there are a ton of articles or posts, Hugo (https://gohugo.io/) is much more performant than Jekyll which uses Ruby instead of Go.

    Alternatively, you should definitely look into Craft CMS (https://craftcms.com/) which is incredible for managing content and is extremely flexible. I've helped to build Craft sites that were deployed to 1 million unique users per month with 100s of pages of content. It is a far better developer and authoring experience than Wordpress.

    Static site generators are great and lightning fast, however, the author needs to have some knowledge with markdown or coding to deploy content and it can be a slower, less flexible setup than using a CMS.

    2 points
    • Dan WilkinsonDan Wilkinson, over 4 years ago

      +1 here for Craft CMS.

      1 point
    • Mike Wilson, over 4 years ago

      Your last point is very important.

      My advice to OP would be to not fall into the trap of the latest shiny object. Gatsby/Hugo + Netlify is definitely an awesome setup for something like a portfolio or a brochure site that doesn't get updated frequently. Continuous deployment from Git to Netlify is a dream.

      HOWEVER, for an editorial site being updated daily, having a workflow where you can update via logging into a CMS with robust SEO features is going to be far more important. Netlify CMS (which you can attach to Hugo, etc) is just okay, and doesn't offer enough features out of the box.

      If I was OP I'd go flat file CMS like Statamic or Kirby, or if you're not well versed in front-end development, gasp Wordpress. Wordpress, while bloated and generally terrible to work with, has plugins to handle every possible scenario an editorial site will encounter. Setting it up at first will suck, but the writing experience will be a much faster workflow.

      1 point
  • Mikael StaerMikael Staer, over 4 years ago

    Sounds like Statamic (www.statamic.com) would be good for this.

    1 point
  • Parker Hutchinson, over 4 years ago

    AWS(amazon web services) entire documentation layer is built in jekyll. Thats 1000's of pages of content. I personally would use Gatsby with Contentful. I Just finished building a site with gatbsy. Jekyll is just a little outdated workflow imo. gatsby is more modern solution and with that more modern tools work with gatsby like netilfy and contentful.

    1 point
  • Erhan D'SilvaErhan D'Silva, over 4 years ago

    What is everyone's thoughts of Gatsby vs Hugo?

    0 points
  • Csaba Kissi, over 4 years ago

    Hugo is written in Go and is extremely fast. Jekyll is more popular but much much slower. I would go with Hugo and host it on Netlify. Even the free tier can hold it. You can scale without any issue.

    0 points
  • Bole ★, over 4 years ago

    For your use case, “a magazine … that'll have daily or weekly stories with an archive”, the best option is still Movable Type.

    Commercial: https://www.movabletype.com/

    Open source: https://github.com/movabletype/movabletype

    0 points
  • Catalin CimpanuCatalin Cimpanu, over 4 years ago

    Yes. A lot of people are. Know a few friends that are running podcast sites on them (sparse content, highly trafficked) and a news aggregator for infosec-related topics (lots of content, less traffic). Also Smashing Magazine is also running on a static site (lots of content, highly trafficked).

    If I'll need to create a news site these days, I'm going with a static site generator or a headless CMS myself too.

    0 points
  • Praneeth Pike, over 4 years ago

    Well I'm not sure about jekyll. But we've just made a website using Gatsby + Prismic Headless CMS + Netlify. Gatsby is a react based static site generator. Using netlify and prismic, we were able to use Webhooks to trigger a deploy everytime a new change is performed on the CMS.

    So I guess may be if there's a way to support webhooks between jekyll and your cms it'd help.

    If you wanna take a look at the site: www.ahl.news

    PS: It's a south Indian magazine, we have no affiliation to what content they are posting! And also, it's not in production mode

    0 points
  • . h, over 4 years ago

    Well, I am not an expert on this, but if you're going to have daily updates, maybe a static site generator won't be that good, because you actually need to deploy it everytime you update your content. Unless you have some CI/CD things going on. CMIIW.

    0 points
    • Tiny Machine, over 4 years ago

      You'd think using a static site generator for a site with frequent updates would be a pain, but SSG-based sites (especially Hugo-based ones) can be quick and painless to build and deploy, daily or even more frequently.

      With many (most?) webhosts you can transfer files over SSH, so setting up a script to deploy your site over SSH (using rsync, for example) can make deployment simple. Even better, as you suggest, is a continuous integration setup. As a designer, I thought this would be really complicated to set up, but it can be really easy with services like Netlify. Here are their instructions for setting up automatic building and deploying every time you commit changes to your remote Git repo.

      0 points