13 ms·
Ask HN: Best Static Site Builder?
What's the best static site builder these days? One that generates static assets you can host yourself, say, on S3, etc.
- black_knight 7y agoI use pandoc[0], along with an mkfile – which is like a makefile, but slightly cleaner[1]. The mkfile handles deployment (just scp a fixed list, keeps me in control over what is put online) as well as construction of the pages. It also runs checks like spelling and liveliness of links. Local links are checked by first cloning the repo, so that I do not forget to add files. There is also some custom code in there to add prefetch links for local files. [0]: https://pandoc.org/ https://pandoc.org/ [1]: https://9fans.github.io/plan9port/man/man1/mk.html https://9fans.github.io/plan9port/man/man1/mk.html
- rogerbinns 7y agoThey will generally all meet your criteria, but there is one important gotcha to watch out for. If you intend to maintain the site for a long period of time (years) then look very carefully at features and functionality, and rate of development. The more that exist and rapid development, the worse your experience will be! Those features end up using third-party libraries and other tools. The static builder as well as those libraries/tools keeps getting updated, until each time you try to use the builder you get a long list of warnings (or worse errors). You spend more time updating configuration files, deciphering why you should care about a default changing, wondering what Ubuntu has renamed a package to this week, and somehow end up stubbing your toe on NPM even though you picked the builder because it was in another language. (Minor exaggeration for effect.) TLDR: pick the builder with the least amount of functionality and development pace to keep things simpler over time.
- benibela 7y agoI use XQuery. You write HTML as usual, and everything between {} parens is evaluated. For example <a>{1 to 10}</a> is evaluated to <a>1 2 3 4 5 6 7 8 9 10</a> Or <a>{(1 to 10)!<b>{.}</b>}</a> becomes <a><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b><b>10</b></a> XQuery is a W3C standard, so there are several implementation of it. I wrote an XQuery interpreter (http://www.videlibri.de/xidel.html http://www.videlibri.de/xidel.html) myself
- nickjj 7y agoI'm a big fan of Jekyll. I've been using it for ~5 years and just made a new site with it recently so I would still use it today. I currently use it for: - My personal blog with 250+ posts and tons of pages[0] - A podcast platform[1] which is open source[2] - The landing pages for all of my web development courses (not going to bother linking them since I don't want to seem like I'm fishing HN for sales) I also recently wrote about my whole site's tech stack here[3]. That post might not fully apply to you since you want to host it on S3. I personally self host everything on DigitalOcean but using S3 wouldn't be a problem. You mentioned "static assets" and this is where Jekyll shines IMO. The jekyll-assets plugin (optional) will md5 tag your assets for cache busting and bundle your scss / JS too. It's really handy and avoids having to set up more complicated tools. It pretty much works out of the box with close to zero configuration. The plugin system is nice too. You can do some really useful things like automatically add certain rel attributes to external links with a few dozen lines of Ruby. It's very handy for a blog. [0]: https://nickjanetakis.com/ https://nickjanetakis.com/ [1]: https://runninginproduction.com/ https://runninginproduction.com/ [2]: https://github.com/nickjj/runninginproduction.com https://github.com/nickjj/runninginproduction.com [3]: https://runninginproduction.com/interviews/1-100k-page-views-a-month-for-5-dollars-with-a-self-hosted-static-site https://runninginproduction.com/interviews/1-100k-page-views...
- sailfast 7y agoI’d second Jekyll because it’s easy to get hosted on GitHub pages with a custom domain, or just a .io default. A no-brainer for low maintenance pages with easy Markdown updates in my opinion. Also nice to know it will be supported by that group since it powers so many pages. The markdown authoring experience is also one that I really love, personally, which is an added bonus.
- nickthemagicman 7y agoI liked Middleman. It seems like a more powerful Jekyll.
- sharcerer 7y agoIsn't Jekyll slow for a lot of blog posts? Also,adding all those plugins for everything must slow it down. Asking you since you have 250+ posts. I had read this in a Hugo vs Jekyll comparison and picked Hugo. Btw, checkout https://www.stackbit.com/ https://www.stackbit.com/. really good.
- 3stripe 7y agoCraft CMS with the Blitz plugin is a pretty nifty combo. https://putyourlightson.com/plugins/blitz https://putyourlightson.com/plugins/blitz + https://craftcms.com/ https://craftcms.com/ (free if you're building the site for yourself)
- jjjbokma 7y agoShameless plug, I wrote tumblelog [0]. Demo site: https://plurrrr.com/ https://plurrrr.com/ It's a static blog generator but can also handle stand alone pages. [0] https://github.com/john-bokma/tumblelog https://github.com/john-bokma/tumblelog
- gamesbrainiac 7y agoI use Pelican with github pages.
- bunsenhoneydew 7y agoI’ve been working with gridsome.org recently and so far it’s been great.
- sebastianconcpt 7y agoI'd use gatsby js deployed on netlify. There are a ton of optimizations you win in that combo.
- bunsenhoneydew 7y agoI’m using gridsome.org and it’s awesome. Mainly because I wanted to use vue.js.
- wolfgang42 7y agoThe thing about static site builders is that it's really easy to get started building one, and very difficult to make one that meets everyone's needs. The result of this is a sort of Life-Cycle of the Static Site Generator: 1. Look at the huge list of open-source static site generators (literally hundreds![1]) 2. Try some out, and fail to find one that works exactly right. 3. Start writing a new one that fits better. 4. Gradually extend it and make it more general. 5. Get excited about how useful it is, and publish it as an open-source project so others can use it, adding it to the already enormous list. 6. Someone else starts at step 1. [1]: https://www.staticgen.com/ https://www.staticgen.com/ I've taken to just building a new one one to meet whatever my immediate need is, and developing a sort of mental toolkit of techniques rather than trying to smush an existing program into the particular requirements of a specific project. You can get surprisingly far with just a handful of lines of code.
- quickthrower2 7y agoI like knocking up JS to pump out some HTML and often it’s quicker than using a framework when you consider how much of a dead end they leave you in when there is something they can’t do with their DSL or whatever. Another fine alternative is just use Wordpress!
- sovok 7y agoOr use WordPress to manage your content, then create a static site from that with https://wp2static.com https://wp2static.com or https://www.simplystatic.co https://www.simplystatic.co. Not nearly as fast as Hugo or Jekyll (~5 minutes to generate a 1300 post blog), but a nice alternative if you want to keep using a CMS and don't want to expose it to everyone.
- jeromescuggs 7y agothank you for this link - i want to use jekyll or hugo, i do, but i am real bad at organization and i always fall back to using a local WP install to take content and do all the heavy lifting - organizing it, styling it, etc. i get insanely frustrated sometimes trying to work with hugo, just little things that fly in the face of what is mostly a pretty straightforward program, but its those little things that really ruin the entire thing for me.
- gbuk2013 7y agoI like Javascript so I use Metalsmith[0]. It’s a very simple core with functionality added by plugins, of which there are many, covering everything I ever needed to do with my site. Here’s a simple example of a blog + standalone pages, similar to what you get with Wordpress install[1]. [0] https://metalsmith.io/ https://metalsmith.io/ [1] https://github.com/borisovg/metalsmith-blog-example/ https://github.com/borisovg/metalsmith-blog-example/
- intrepidhero 7y agoFor me, I'd rather brush up on my HTML and CSS than learn a new framework. So I coded a mockup webpage, google'd for responsive CSS layouts and tested on a few devices. Then a little python glue (which I enjoy hacking with) to turn that template and markdown into a simple website. Et viola! http://fadedbluesky.com/projects/sitegen.html http://fadedbluesky.com/projects/sitegen.html
- petepete 7y agoIf you want a site rather than a blog, I'd recommend Nanoc. It's a bit more hands off than the likes of Jekyll and Hugo but is incredibly flexible and powerful. I use it for generating the guide for one of my projects. It loads a Rails form builder and generates syntax highlighted code samples and output with barely any effort. https://nanoc.ws/ https://nanoc.ws/
- azangru 7y agoIt’s like asking what is the best web framework, or what is the best scripting language. There are several prominent static-site generators, each with their strengths and weaknesses. 1. What is your preferred language? For Ruby, it’s probably Jekyll, Middleman, and maybe nanoc. For Javascript, it’s Gatsby and Eleventy. If you don’t mind Go’s templating language, it’s Hugo. 2. What are your priorities for a static-site generator? - available themes? then it’s probably Jekyll or Gatsby - easy generation of documentation? Docusaurus might be worth a look - flexibility? for a front-end developer, Gatsby is insanely flexible - fast build time? Hugo is probably unbeatable - small initial payload? not Gatsby then (eleventy looks nice, and was used by Google webrel folks to build the Chrome Dev Summit site). Keep in mind that server-side-rendered React, used in Gatsby, will leave your site non-interactive during the time javascript is loading My personal preference, as a frontend developer who likes javascript/typescript and React, is Gatsby, but Eleventy is looking increasingly appealing.
- nico_h 7y agoI have to plug mine, even though I haven’t touched it in years: Frankenstein’s ___.sh , a bash script that mash some html placeholders together with your multimarkdown content into a bunch of static files. Supports blog, hierarchical and plain pages. It’s 84 lines in total plus the ”templates” https://github.com/nicolasH/frankensteins https://github.com/nicolasH/frankensteins
- vira28 7y agoHugo. I do mine on https://viggy28.dev https://viggy28.dev hosted on Firebase. Source https://gitlab.com/viggy28-websites/viggy28.dev https://gitlab.com/viggy28-websites/viggy28.dev
- Nic0 7y agoHugo is my choice as well
- bilal4hmed 7y agoSame I use hugo for my blog too, hosted on Firebase. I use Gitlab to host and use their CI/CD to publish the site.
- vira28 7y agohaha. ditto so far :) Let's see how long we go. DNS provided by Cloudflare. Comments with Disqus.
- bilal4hmed 7y agoLOL DNS provided by Cloudfare, comments w/ Disqus
- prophesi 7y ago+1 to Hugo. Time it takes to run a build for my site: | EN +------------------+-----+ Pages | 199 Paginator pages | 11 Non-page files | 0 Static files | 70 Processed images | 0 Aliases | 5 Sitemaps | 1 Cleaned | 0 Total in 142 ms Self-hosted, works with IPFS, open-source Commento for comments.
- Papirola 7y agoI like Gatsby - it's very easy to use if you are familiar with React
- RobinL 7y ago..and also super flexible/powerful. If you just want to turn markdown into static pages, it's probably overkill. But if you want interactivity or complex layouts, it's great. Here's my Gatsby site: https://robinl.github.io/robinlinacre/ https://robinl.github.io/robinlinacre/
- joeyspn 7y agoAnother vote for Gatsby here. If the OP does js he should look no further. Although it all depends on what language he is most comfortable with.
- Touche 7y agoGatsby sites are bloated with JS that is mostly not used. If the goal is a static site then Gatsby might be the worst possible choice.
- mattkevan 7y agoI’m sure there are occasions where it makes a ton of sense, and React, especially for large or complex web applications, is amazing. But for a static site generator, it’s like someone sat down to develop the most convoluted way of getting a bit of html on the screen. Bonus points for the resulting site not working at all without JavaScript.
- jakub_g 7y agoRecently there's been a lot of buzz about https://www.11ty.io/ https://www.11ty.io/ on Twitter (haven't used personally).
- Touche 7y ago11ty solves static site generation to me. What makes it unique is it's simplicity. Unlike others it doesn't work on a lot of conventions. It supports a bunch of template formats that can be nested. And that's pretty much all there is to it.
- javaIsGreat 7y agoCopying create-react-app's static build is my favorite/simple option, gatsby is a fun option as well if you dont mind working with react, docs are great, they point you to lots of example sites you can reference for help
- JDiculous 7y agoHow did you get Create-React-App to transform markdown files and build separate HTML files for every page? Because it doesn't do any of that out of the box. Of course it's possible to set this all up, but I don't think it's fair to refer to Create-React-App a static site generator.
- frabert 7y agoShameless plug: I made one that uses bash & pandoc because it was fun :) https://blog.frabert.me/posts/2018/11/11/blash.html https://blog.frabert.me/posts/2018/11/11/blash.html
- hazbo 7y agoA slightly different take on this. I've recently seen people combine Pandoc[1] with their own (generally quite small) shell script. It's pretty amazing how little time it can take just using Pandoc / shell to come up with something that's just right for your needs, without all the bells and whistles. [1]: https://github.com/jgm/pandoc https://github.com/jgm/pandoc
- black_knight 7y agoI use pandoc with mkfiles. Very simple, but really lots of possibilities (I have added liveliness checks for links and spell checks, etc).
- copperx 7y agoWhat is a mkfile? A makefile for a more modern build system?
- black_knight 7y agoYes, basically. But modern meaning from the early 90s: http://doc.cat-v.org/plan_9/4th_edition/papers/mk http://doc.cat-v.org/plan_9/4th_edition/papers/mk
- flir 7y agoI use pandoc for my resume. Had never considered that - thanks!
- teodorlu 7y agoI'm using Pandoc through Hakyll[1]. Hakyll does the static site stuff, and delegates to Pandoc for document conversion. Configuration is in Haskell. [1]: https://jaspervdj.be/hakyll/ https://jaspervdj.be/hakyll/
- lazyjeff 7y agoJust curious, what's wrong with plain html/css? Seems more powerful now than ever, with flexbox/grid and the new css features.
- hartator 7y ago+1. I don’t get it either. Maybe the ability to use Markdown?
- ElCapitanMarkla 7y agoIt’s fine until you have a list of blog posts etc that you want to generate your static site from
- hartator 7y agoHow is that different than just copy pasting a new page?
- crucio 7y agoWhat if you want to update the template? You'd need to change it on every page. That's fine if it's only a dozen, but does not scale well.
- wishinghand 7y agoI used to have a 5 page portfolio site and it was a pain even with that few copy/pastes to do in order to update my header. Static site generators ftw.
- wishinghand 7y agoIf you want the pages to share a header, footer, and menu, it can be a pain because if you ever want to change something in a shared component, you'd have to do it for every single page.
- hazbo 7y agoI think this is the way to go if you're not one to change the HTML very frequently. It can be a repetitive process to update HTML for each page if you've wound up with lots of them. If that's not so much a concern, go for it!
- RobGav 7y agoI recommend Publii.
- ElCapitanMarkla 7y agoI’ve used Jekyll a lot over the years. It’s always worked well for what I’ve needed
- 3pt14159 7y agoFor my personal site I just I built my own with Ruby and I love it. It's perfectly molded to my use and I don't have to fuss around with keeping up with updates or handling edge cases that static site builder may not have thought of. For example, some of my work has been translated into other languages and having a template that was easy to streamline into French is really nice. And really static site builders are EASY to build. It's just building strings! It feels like so much of development has turned into libraries and glue code these days. It's nice to have something small and simple.
- brabel 7y agoI did the same thing, but in Go. Tried using Hugo but it was full of magic and silly naming and conventions that I really didn't like. I even created my own little language which I used the Go parser to parse (but the syntax was closer to Lisp - the Go parser is just for the expressions after the commands - e.g. `(cmd expr)`). After I made it, I discovered that this is one of the most popular projects for programmers to embark on and actually pull off something usable (it's both useful and interesting, while not being too overwhelming)... Here's a full list with 100s of static site generators (mine included haha) : https://www.staticgen.com/ https://www.staticgen.com/
- Vinnl 7y agoReally depends on your needs, I guess. Being familiar with React and Javascript, React Static [1] was really quite great: easy to use, works without Javascript, but for people with Javascript enabled, page loads while navigating the site are way faster and don't require a full page refresh. Plus, it's far easier to use than Gatsby in that it doesn't require you to use a whole local GraphQL database, which is great for use cases in which the pages of your website fit in memory easily. [1] https://react-static.js.org/ https://react-static.js.org/
- drad 7y agoPersonally, I'd go with hugo as it is fast at generating but I've used nikola for years as it is python based (my prefered language). I'd recommend checking out https://www.staticgen.com/ https://www.staticgen.com/ as it tracks SSG's popularity and gives nice info. A SSG built on a language/platform you are comfortable with is always a plus as sometimes you just need to get under the hood and ti.ker with things.
- heliodor 7y agoThank you for pointing out StaticGen. Now I can find the product built with technologies I know so that I can get stuff done quickly instead of learning the tools of the most popular product on that list.
- KajMagnus 7y agoAnd for people who want "Hugo but written in Rust" or "Hugo but written in Javascript" — then, there's Zola (Rust): https://github.com/getzola/zola https://github.com/getzola/zola, and 11ty (Javascript): https://github.com/11ty/eleventy https://github.com/11ty/eleventy. (Or at least that's how I think about these two.)
- nicoburns 7y agoWhy would you want that? I generally prefer Rust or JavaScript over Go. But with a static site generator, you're not actually using the language at all, and Hugo has a much bigger ecosystem.
- mynegation 7y agoSome people may want to tinker with the generator, write some plugins (if supported) or just see how it is built.
- nine_k 7y agoLooking in the sources? Fixing a bug?
- DarthGhandi 7y ago
- juvoni 7y agoI'm moving my blog to GatsbyJs coming from Wordpress and it's been great so far. Significant performance improvements, great plugin ecosystem and utilizes common front-end patterns with less context switching if you have front-end experience using JS/React as opposed to Python, or Go based alternatives.
- brenden2 7y agoI'm using Hugo with Netlify. I've used just about every tool over the years, and I'm pretty happy with Hugo. Netlify makes deployment a breeze, and there's a free tier with 100GB of bandwidth which is fine for a basic blog. If you want to do anything fancy, or you have a love for React, I'd suggest Gatsby as an alternative. It also makes it easier to pull in the JS ecosystem. Currently, pulling in JS libraries with Hugo is a bit clunky because it doesn't integrate directly with the standard JS tools (npm, webpack, etc). Here's the source for my site: https://github.com/brndnmtthws/brndn-io https://github.com/brndnmtthws/brndn-io
- gcatalfamo 7y agoI love this stack. Although the one where you are most comfortable with is the way to go, hugo + netlify (and eventually add forestry if you need a real CMS) is astonishingly easy and straightforward to set up. Just amazing. edit: About adding js libraries, just import them via html instead of using package managers
- hanniabu 7y agoAny reasons you prefer Hugo over Jekyll?
- h2odragon 7y agoI recently learned Pelican: http://getpelican.com/ http://getpelican.com/ It is a Python based, "make a blog from theme template and markdown content" engine. There's hundreds of themes and plugins for all sorts of functionality. I spent some time twisting it and its theme engine to make http://snafuhall.com/ http://snafuhall.com/ (read as, don't blame them for my site, the horrors are all my responsibility)
- robohoe 7y agoI second Pelican. Python based and super simple. Plus ReStructuredText support!
- BeetleB 7y agoNot just rst support, but with plugins you can get support for pretty much any format. I wrote a plugin for org format. All it does behind the scenes is create an rst using pandoc for each org file and Pelican handles the rest.
- jaredcwhite 7y agoI use Jekyll and Webpack (plus Stimulus) together and write a number of plugins to help me build component-ish website layouts with various interactive bits, and that's worked out quite nicely. At this point anything I build that's not a Ruby on Rails app proper starts its life out as a Jekyll project. * Biz site: https://whitefusion.io https://whitefusion.io * Personal site: https://jaredwhite.com https://jaredwhite.com
- zarify 7y agoI quite like Publii. It’s more of a CMS that builds a static site, and is nice from a “don’t want to fiddle with template languages” perspective. Will push to different services (I use GitHub Pages) as well as just generate a folder to sync yourself.
- superkuh 7y agoThe best CMS is the filesystem. Don't be afraid to just write HTML and use it. For my personal site I write html posts as discrete files with filenames that allow me to use bash to cat them easily into pages. Then every time I write a new post for the blog I just run something like, ls -v 2019-*.html | tac | xargs cat > blog-2019.html To style the raw posts themselves I use HTTP header linked CSS (https://www.w3.org/TR/html4/present/styles.html#h-14.6 https://www.w3.org/TR/html4/present/styles.html#h-14.6). It doesn't work in every browser but I don't care about every browser. That's the joy of personal sites. You can just do what you want. For generating the RSS feed I wrote a small perl script. Everything is hosted from home with nginx running on my main desktop over a cable ISP connection.
- LeoPanthera 7y agoI have a server-side CMS written entirely in bash. It was originally kind of a joke, but it's been working well on a relatively high-traffic site for over 5 years now so I guess the joke is now on me. I named it SCMS, which was originally "stupid CMS", but maybe now I can retcon it to "shell CMS". I'm still too embarrassed to release it, though.
- ivanhoe 7y agoWe now have come the full circle, and I expect that people now - after rediscovering plain html - will next start to rediscover all the issues with maintaining purely static html sites, all those reasons why we ditched the idea back in 90s
- mirimir 7y agoYes, I also still prefer HTML. I mostly do Tor onion sites. So I absolutely don't want any scripting. Because that would piss off the most valuable part of my potential audience. And given Tor's latency, you want to avoid unnecessary traffic. I write mostly in ReText. It generates decent HTML. But I usually end up tweaking.
- kissgyorgy 7y agoHands down Gatsby. It's just incredible. Can pull data in from almost any source (Wordpress, CMS, Markdown). It's the fastest you can ever get, because it utilizes service worker and preload and caches pages on mouse hover. It works offline after you visited the page once. It fully pre-renders every page on build time so works without javascript a bots can crawl the original pages without javascript!
- siod 7y agoI'd probably recommend Gatsby, it's super flexible, has great documentation, tons of plugins and includes good defaults. I've previously used hugo to build some customer sites. It's super quick to build, but we ended up replicating a bunch of work that Gatsby has support for like image optimisation, minification, etc. Netlify is a good hosting option if you're not married to S3.
- andrewstuart 7y agohttrack - an open source utility that downloads a site and makes it static - so build it with wordpress for example then download it to deploy using httrack https://www.httrack.com/ https://www.httrack.com/
- legends2k 7y agoI'd recommend Hugo for - Single binary distribution. No dependencies or time wasted setting up things. Just extract and use. - Dozens of themes to pick from [0] - Straight forward customization of theme's styling - Tinkering Go templates are fairly easy - Accepts markdown and Org-mode as input formats - Tags, categories, multilingual, search, etc. - Support for comments [1] I've been using it for my site [2] for more two years now. It has embedded JavaScript/CSS WebGL demos, code blocks with syntax highlighting (again no dependency on Pygments, etc. and has preset themes), images, footnotes, math equations using MathJax, etc. Tools enough to write a well-formatted book. [0]: https://themes.gohugo.io/ https://themes.gohugo.io/ [1]: Disqus, Utterances, Commento, etc. [2]: https://legends2k.github.io https://legends2k.github.io
- spectramax 7y agoI don't recommend Hugo for: - Confusing architecture - Steep learning curve I recommend Jekyll more than anything else. It is simple, beautiful and straight forward. Easy.
- StavrosK 7y agoI agree on not recommending Hugo, I spent way too much time on it without being able to figure it out. I now use Lektor, it's simple and very flexible.
- cookiecaper 7y ago+1 for Lektor, great project. I've been using it for my site for the last 2 years or so and it's been much less hassle than Hugo.
- deepspace 7y agoAnother +1 for Lektor. I use both Lektor and Hugo to run a few static sites and have come to dread updating the Hugo ones, while the Lektor model just seems to fit better with the way I think.
- 7y ago
- fooey 7y agoIt's might be overkill, but you can have next.js generate static sites for you using react/node https://nextjs.org/features/static-exporting https://nextjs.org/features/static-exporting https://nextjs.org/learn/excel/static-html-export https://nextjs.org/learn/excel/static-html-export https://nextjs.org/docs#automatic-static-optimization https://nextjs.org/docs#automatic-static-optimization
- hcarvalhoalves 7y agoPandoc + Makefile https://gist.github.com/hcarvalhoalves/27c3c43f21cd7c7df04cee69248f102e https://gist.github.com/hcarvalhoalves/27c3c43f21cd7c7df04ce...
- mproud 7y agoDoes anyone have any recommendations that require very few dependencies?
- vortico 7y agoI don't like writing manual HTML/CSS/JS, so I write Pug/Stylus/Coffeescript and generate the site with a Makefile that calls all the compilers. For example, SOURCES += $(shell find -name '*.pug') OBJECTS += $(patsubst %.pug, %.html, $(filter %.pug, $(SOURCES))) all: $(OBJECTS) %.html: %.pug pug -P $^
- happybuy 7y agoI recently evaluated a bunch of static website builders to find the best one to create and manage a website for my app[0] which is hosted on Amazon S3. This was to replace a hand-coded HTML site. I tried Harp, Wintersmith, Jekyll, Hugo and Gatsby. After doing a few tests, I found that Jekyll was the best match for my uses. It seemed the most straightforward and flexible without being unnecessarily complex. Creation of templates with custom content types was straightforward and templating didn't force the site into an overly specific HTML or directory structure. Would recommend for similar product based or article sites. Personally haven't had any issues since migrating to Jekyll. [0]: https://www.magiclasso.co/ https://www.magiclasso.co/
- grdeken 7y agoWe've been working on https://www.unstack.com https://www.unstack.com to provide one comprehensive toolset for building and scaling up a static site. Would love to hear feedback from HN.
- stevenicr 7y agoI still wish netobjects fusion could of adapted to the html5 future. It handled templates and generating a wide variety of content very well. Easy to use. I've seen this newer pinegrow editor which looks like the closest replacement for it I've seen: https://pinegrow.com/ https://pinegrow.com/ I still use notepad ++, sometimes sublime text for easier multi-line template updates sitewide, and various templates like bootstrap, bulma, etc If I was going to get into these others I've seen people mention on HN like hugo / jeckly and such, I would probably lean towards using wordpress with one of the two static html generator plugins I've found, that way there are many more template and layout options. (you can use WP to design and crank out pages, shoot out static html and then delete all the wp files... though on sites I zip up the wordpress php files and leave the DB in case I decide to go back and add more posts / pages ) heck bluegriffon or similar can crank out html.. unless I was trying to do some kind of programmatic api connect thing, I just don't see the appeal of these other static generators - but it may just be I've used to more visual things and others are more used to command line kind of things - so long as text hits the web I guess it doesn't matter that much. now if someone was able to make a connector where these static generators could use the themes from the wordpress.org directory - that would have me looking more closely at them.
- earthboundkid 7y agoI am the sole developer on a news site that is generated by Hugo. I find Hugo to be extremely flexible. But I am considering switching to Nuxt so I can ingest pages from an API instead of just md files in the repo. Still, you can’t go wrong starting with Hugo. It’s extremely versatile. https://github.com/spotlightpa/poor-richard https://github.com/spotlightpa/poor-richard
- partiallypro 7y agoWordpress -> WP2Static You can deploy it to Cloudflare Workers, Azure Blobs, etc; and you get the customization options/rich library of Wordpress. https://wp2static.com/ https://wp2static.com/
- swiley 7y agoIf it’s just me or other even moderately technically inclined people I’d just write straight HTML in git, no need for some fancy production. I was recently asked to propose an alternate website for the church I go to (they ended up rejecting it, which I think is good because I’m not interested in maintaining it) and what I came up with was an mkdocs repo with a hook to auto rerun mkdocs (so like a janky homebrew version of readthedocs.io) with a custom theme (also in the repo). I’m surprised no one has mentioned it, it’s very complete and I didn’t think it had many dependancies (as far as python projects go.) It just converts a folder full of .md to a folder full of .html and will even add edit buttons to point to a web UI for your repo host (which is really great because that means authentication isn’t your problem, I’ve heard of churches running Wordpress getting their pages replaced with porn because of that which is IMO the worst case for all of this.) I can’t remember why I didn’t use the one written in go, I tend to gravitate towards go projects since the dependancies usually aren’t so bad and you get a (mostly) statically linked binary at the end.
- JDiculous 7y agoHonestly I haven't found any I really like. Gatsby for example I found overly bloated (eg. requiring GraphQL - with which you can't even dynamically generate queries) without offering everything I need out of the box (eg. Disqus integration), build times felt long, and there are very little templates (at least last time I used it) and like other SSGs switching a template basically requires re-architecting your whole app. I think the biggest weakness with these SSGs is the difficulty of switching themes. With a CMS like Wordpress, changing themes takes no work, you just specify a new theme. In any popular SSG, changing themes generally means re-architecting your codebase, requiring a developer to dive into the codebase and spend an insignificant amount of time (leading one to question the value of their SSG framework), or otherwise abandon their current project and start over on the new template from scratch. Because changing themes is such a hassle and time sink, if you just want to use a pre-made template and be done with it, then I actually recommend you look for the template you want first on ANY popular SSG, and then just use that (Jekyll seems to have the largest section of templates). If you're planning to make your own custom template and you're a developer, then honestly I recommend you to just create your own project without these SSG frameworks, unless you just really happen to like the (often super overly opinionated) stack that they tie you into (that won't be cool anymore a year later as developers flock to the next shiny thing). Even then I think you'll find yourself working against the framework more often then you'd like, pretty much defeating the purpose. For my needs I found it easier to just parse my own Markdown files and use an npm library like showdown to convert them to HTML, and then just develop in my preferred stack.
- throwawayt856 7y agoI build my static site with flask and frozen flask.
- djyde 7y agohttps://saberjs.org https://saberjs.org
- AussieCoder 7y agoI've been using this a lot recently and love it. Fast, simple and VueJS-based so easy to extend.
- fabianhjr 7y agoHakyll for any thechnical / math releated site. It has native support of code highlighting and LaTeX trough pandoc and is highly customizable.
- swalladge 7y agoWhat's the best programming language? Best text editor? Best car? Best book? There is no absolute best, otherwise everyone would use that and we'd only have one left to choose from. There may be a best for your specific use case, but to find that you'll need to do your own tailored research to decide.
- sharcerer 7y agoIf anyone wants to recommend something for beginners. Then checkout https://www.stackbit.com/ https://www.stackbit.com/. It can even convert your existing themes b/w various SSGs (like Hugo,Jekyll). And they have some pre-made themes too, although, small selection, but good ones. Just a 4 step process: https://app.stackbit.com/create https://app.stackbit.com/create
- psion 7y agoI'm not going to call it the best SSG out there, but not the worst. I wrote one and released it. It started as something to just spit out some Twig templates wtih content mixed in, and a few features later, I had a Static Site Generator. And anybody who wants to take a look, maybe make some pull requests, it's in my github, https://github.com/SeleneSoftware https://github.com/SeleneSoftware
- yannikyeo 7y agoCheck out Svelte/Sapper which is server side JS framework but can generate static site. Svelte is SPA framework like Angular, React, VueJS. Sapper is like NextJs/NuxtJS, with server side rendering features for Svelte.
- jonny383 7y agoVim or Emacs?
- neuronsong 7y agoEmacs and evil mode... or spacemacs... I want my cake and eat it too. :)
- skittleson 7y agoAfter using all the popular static and non static site builders, I ended up creating a single utility js with nodejs. Some markdown and handlebar support... a little scrappy but proud of it. Opensource too... https://docodethatmatters.com https://docodethatmatters.com
- davelondon 7y agoTake a look at forestry.io - it's a CMS that can use various different static site generators, but edits in the CMS are committed directly to your git repo. So all your content stays in git, and yet you can still collaborate with non-technical partners. I built https://www.wildernessprime.com/ https://www.wildernessprime.com/ (https://github.com/dave/wildernessprime https://github.com/dave/wildernessprime) with it. Also check out https://dlvrit.com/ https://dlvrit.com/ - this posts new articles to social networks automatically. I've configured it so that: * There's a tick-box in the forestry config for posting to social networks. * When this is ticked, Hugo includes the article in a special custom RSS feed. * dlvr.it uses that custom RSS feed as its input. So as far as my non-technical collaborator is concerned, when they're happy with the article, they tick the Socials box in the forestry admin and it magically posts to all the social networks. It's awesome.
- tnolet 7y agoTried using Forestry (twice!) for Hugo based sites. Never got it to work properly. This was at least 1 year ago.
- httpsterio 7y agoI ditched wordpress and the likes around 2012 and I've solely been building static sites since. I've tried most of the bigger generators out there and there's a lot of good new ones, each filling a different need. What I've personally used the most is Jekyll, and while it's great, I wouldn't necessarily recommend it anymore in 2019, mainly due to the diminishing ecosystem. Personally I've moved on to 11ty which is just insanely cool, easy and flexible if you don't hate javascript. just my 2 cents.
- mjurczyk 7y ago(1) Jekyll: + Great if you have 0 programming experience + Extremely quick idea-to-launch time, all you have to do is read a few intro guides and plug in Markdown + Wide-spread support, plugins, guides etc + Simple enough for portfolio websites, flexible enough to build entire products (with a friend we built a mailing SaaS using only Jekyll + some javascript, also a few other projects) - Architecture-wise it is a bit too "flat" for very big projects (2) Gatsby: + A lot of plugins, support, great community + Not very simple, but allows you to do everything from websites to SPA webapps (pretty much entire https://wtlstudio.com https://wtlstudio.com runs on it to generate SEO for websites) - Only if you have JS/Node experience, or willing to learn React - Can take a bit of time set it up, since you are actually going to do some programming
- WinonaRyder 7y agoI've gone down this road and think for most users prerendering is a better approach. Switching to a static site framework or SSR usually means throwing away your existing processes only to be tied into a limited framework that most likely doesn't work with all the tools you already use or want to start using. Just search for SSR on the issue trackers of some your dependencies to see what I mean - just recently a React Beta/RC broken NextJS sites... The right approach( as we see it is to stick a prerendering and maybe a CDN in front of your site and call it a day. Shameless self-promotion:* I/we run oyato cloud (beta), a proxy service (à la Cloudflare) that does prerending, etc. It's per page so you can e.g. code your site in React, but have only the landing page statically rendered e.g. https://oya.to/ https://oya.to/ Demo of a Google Lighthouse simulation of the Product Hunt homepage: - https://oya.to/demo/ph-demo.png https://oya.to/demo/ph-demo.png - or edited demo video https://oya.to/demo/ph-demo.mp4 https://oya.to/demo/ph-demo.mp4 Live demo of a statically rendered version of HN: - https://hackernews.oya.to/ https://hackernews.oya.to/ - or its onion address http://5kaps5io3job5ayhb2o2riiuw6trcavvdeluq4wfnga27j6zrr3k4oyd.onion/ http://5kaps5io3job5ayhb2o2riiuw6trcavvdeluq4wfnga27j6zrr3k4...
- xellisx 7y agoCan anyone suggest a one that can do multi-page artcles / blog posts? And what do people do for commenting? RSS feeds? I don't mind creating templates and have experience wit JS and PHP.
- macando 7y agoIf you love React and being super productive nothing beats Gatsby + TailwindCSS + Netlify CMS/Hosting.
- Porthos9K 7y agoM4 with a makefile on OpenBSD
- actionowl 7y agoI recently picked up Zodiac for a small project as it's just the right amount of simplicity for my needs (uses awk and sh): https://github.com/nuex/zodiac https://github.com/nuex/zodiac
- kpennell 7y agoI tried React-Static (the founder has many inspiring videos) but I wasn't a good enough programmer to build all the nodes/pages from scratch. You are really having to code out some very basic parts of things to get it working. Support was limited. I switched to Gatsby and have generally enjoyed it. Gatsby also has had bugs that take me 10+ hours to fix but there are enough people working on Gatsby that you can often find some blog, SO, or github issue that gets you out of the jam. Gatsby is awesome. It's all React, you can pull from so many different data sources. The plugins mean you're not needing to re-invent the wheel. The downside of Gatsby is still the initial learning curve and API. There's a lot of fairly arbitrary feeling parts in gatsby-node.js, gatsby-browser.js, and the plugins/config that you can get stuck on or confused by. But once you generally get where it all lives, I can't imagine switching to something else. Recent project I built with Gatsby, Material-ui, and google sheets: berlinmusicmap.com
- armonraphiel 7y agoEleventy - https://www.11ty.io/ https://www.11ty.io/ Eleventy is my new Jekyll replacement. - Node.js based (a simple npx command) - Easily understood by beginners - supports multiple template languages - can build pages programmatically (needed for building pages based on external data sources) - is quite fast I’m a huge Gatsby fan but Eleventy is preferred for projects where React isn’t necessary. Hugo also deserves honorable mention but it’s been relegated behind Jekyll, due to its confusing documentation.
- nik736 7y agoMiddleman
- m1guelpf 7y agoI'm currently working on Sitesauce[0], a service that generates a static site from any CMS and uploads it to Netlify or Zeit. It used to require you to host a CMS instance somewhere public, but I've just released a CLI tool that allows you to deploy a local CMS as a static site to the internet. Hopefully it'll help someone :D [0]: https://sitesauce.app https://sitesauce.app
- traK6Dcm 7y agoLike many others posters, also using Hugo + Netlify here. I've never had issues, highly recommended.
- rorygibson 7y agoI'm using Middleman [1] for the homepage of my product Trolley [2] - love it. As an ex-Rails guy, ERB is so familiar, and the rest of the structure just makes sense. 1 - https://middleman.app https://middleman.app 2 - https://trolley.link https://trolley.link
- ainu011 7y agoA couple pros/cons for different SSGs (never mind the title) https://dev.to/cookieduster_n/top-5-static-site-generators-for-2020-28ni https://dev.to/cookieduster_n/top-5-static-site-generators-f...