Ask HN: What's a good static site generator to use for a blog in 2018?
I've been meaning to start blogging for a while now but I never got around to it. I do have some time this weekend and I thought I'll give it a whirl then.
I recently read about Hugo and I was wondering if it's good enough for me to start with? Has anyone used it? How has your experience been so far?
My posts will mainly focus on little programming tidbits that I learn while I'm working so yes, it will involve code snippets. Markdown support is a huge pro for me as well. I am aware of Jekyll as it's one of the biggest players in this segment but everyone's been complaining about its speed which is why I'm not leaning towards it.
If anyone's got some advice on what SSG I can use, fire away. If you can, highlight both the pros and cons so I can make an informed decision on this.
Thank you for your time! Cheers!
128 comments
[ 5.3 ms ] story [ 202 ms ] thread[1]: https://rootlesscontaine.rs/ [2]: https://umo.ci/ [3]: https://www.cyphar.com/
Also, you've mentioned in the sidebar that you've built it using Grav and Hugo. Would you mind explaining how you've used both? And why perhaps? Just curious because someone here suggested Grav over Hugo and you seem to be using both.
I could make one with Django (overkill, I know) as I primarily work with it but I don't have a VPS set up yet and I don't think I'm going to attempt to get one anytime soon. The main reason why I wanted a static site is to not deal with configuring and maintaining the server. Thank you!
Yup.
> I liked the second one as well. What theme is that? [...] Also, you've mentioned in the sidebar that you've built it using Grav and Hugo.
The theme is a Grav theme, ported to Hugo[1] (hence the "made with Grav and Hugo" -- the actual site is made with just Hugo). The source for the site is [2]. And the source for my other sites are here[3,4].
[1]: https://github.com/matcornic/hugo-theme-learn [2]: https://github.com/openSUSE/umoci/tree/b9e256550d732c14beeab... [3]: https://github.com/cyphar/rootlesscontaine.rs [4]: https://github.com/cyphar/cyphar.com
[1]: https://github.com/matcornic/hugo-theme-learn [2]: https://github.com/getgrav/grav-learn
It's not a sexy answer, but it's practical. Just make sure you don't leave the WordPress site you use to generate static content open to the public.
The fact that you mention it has a content-editor indicates you're not using it in a static fashion.
(Correction, I hadn't realised you could use it in a static way... I last touched WordPress back in the dark ages!)
I've been running my own blogs / portfolio in the last decade on static sites, from now now I'm using this new combo. Why? With the advent of the headless CMS scene static site generators just lost their unique advantage to spitting out HTML files. And meantime they didn't advance at all on the content creation side.
Creating, managing and distributing content with a CMS is far easier than with a static site generator. And when the final output is the same the choice is obvious.
Disclaimer: I'm not affiliated with HardyPress nor Wordpress, however I do create themes for Wordpress.
Notes: In my profile the first link is a statically generated site, as well as the others in the About section. The second link is a Wordpress+HardyPress combo and you can check it live the amazing speed it offers.
There's really no value in "static" websites, if by static you mean pure HTML and CSS. a 512MB server from vultr for $2.50/mo can host dozens of simultaneous visitors on a well-built WordPress site without any slowdown at all.
I've used it a little over a year ago and found things rather unintuitive when it came to setting up plugins. Not sure if it's gotten any better though. But, if you say it's practical, I'll give it another look and see if suits my needs. Thank you!
-- Ghost (expensive but dead simple to apply themes) or
-- Hugo + Netflify (for hosting and automatically publishing your site when you push to your repo) + Forestry.io (for a nice front end to edit your posts if you want to avoid the command line)
I care about Markdown plus MathJax support (for math notation) and both these options support that.
Edit: ok, pricing page says „For professional bloggers“
If you're a developer and you want to just DIY - then you can. If you'd rather just pay someone else to manage the entire thing for you - then you can.
Thank you for Forestry though! Didn't know about it. Will definitely come in handy when I can't get to my personal laptop.
Other than that I've never really understood the appeal of static site generators for normal websites or blogs that don't have millions of monthly page views.
Tools like Hugo for many common use cases (like ordinary websites with ordinary scalability requirements) often come across as a solution desperately looking for a problem while at the same time creating a few new problems: Compared with dynamic website software like WordPress they can be difficult to set up and they tend to be more difficult to use, especially for non-technical users.
If it's for blogging, you can also take a look at Blogger, half the programming & security blogs I follow are on it.
https://www.vox.com/2016/7/30/12303070/dennis-cooper-blog-de...
https://www.theguardian.com/music/2010/feb/11/google-deletes...
http://www.nydailynews.com/news/national/artist-loses-14-yea...
I'll check it out. Seems to be mature enough to give it a try. Thank you!
[0]: https://www.staticgen.com/
I'm not familiar with Ruby at all as I primarily work on Django. Go has always been on my todo list so I'm mostly leaning towards that for now.
Thank you for the link! I can have a good look at all the available options :D
https://github.com/geekodour/gitpushblog
http://bytepawn.com/how-to-make-a-blog-like-this.html
Only having to send a bunch of static files makes it really easy.
I use it for a simple, mostly text, blog (https://kar.ai).
I also use it for an image-heavy company site (https://www.stonelandinc.com).
I also use it for 20+ other sites for clients.
It's undergoing heavy development, so that may be a pro or con, depending.
e.g. Recently they added image processing [0]. This eliminates a python script I was using for the same purpose. It's much faster as well, which matters when regenerating ~1k images.
Down side, documentation & community is still catching up on the newer features.
0: https://gohugo.io/content-management/image-processing/
I do not think the blog is going to be too image heavy as I'd like to keep it simple for now but it's definitely a plus to have. Thank you! :)
That unfortunately has happened to me with other static site generators (breaking changes between versions with no automatic way to resolve them or thorough documentation on the changes to make to the source).
Honestly, they were minor enough that I don't remember the specifics, and it didn't take me long to fix.
Since they're not at v1.0 yet, this is to be expected somewhat.
After you’ve put a dozen or so posts together you’ll have a better feel for what your needs are and you can then migrate your posts to the new platform of your choice - you can even write a blog post about it :-)
You're right though. From what I can tell, most of these alternatives seem to be interoperable and I can jump around easily if need be. I'll start with hugo and see where that leads me. And I'll blog about that as well :) Great idea :D Thank you!
https://bvallieres.com/resource/2015/07/29/jekyll.html
- [0] https://gohugo.io/
- [1] http://themes.gohugo.io/
- [2] https://pages.github.com/
- [3] https://www.digitalocean.com/
- [4] https://www.robinwieruch.de/own-website-in-five-days/
https://begriffs.com/posts/2014-08-12-create-static-site-wit...
EDIT:
Tutorials about Hakyll: https://jaspervdj.be/hakyll/tutorials.html
https://startuplab.io/blog
It's very flexible, written in python, easy to customize, has plugins for any purpose. It supports markdown, latex, code snippets (with syntax highlighting). It's very simple to set up and you can use it for any purpose.
I've made a custom theme, configured it a bit, and served it with nginx on digital ocean(but you could also host it for free on github pages).
You can see the code and my custom theme here:
https://github.com/raymestalez/startuplab
----
Here's a few simple things I want to recommend, based on my experience:
- Immediately setup a mailchimp account and an RSS feed. Add a link in the header, and under each post (you can see how it works on my blog), you want to start build a list of followers right away.
- Ideally, write a short ebook or a guide to give people extra incentive to subscribe. The sooner you do this - the better. Here's a sexy landing page I've made for my blog to use as an example:
https://startuplab.io/free-guide
- Keep the design elegant and simple, nobody needs distracting sidebars or popups, avoid them unless absolutely necessary.
- Underneath my posts, I have 3 boxes recommending my other articles (or promoting my projects), it's a really neat way to keep people on your site.
- Don't forget to set up metadata and social images for good SEO and sharing. You can see how I did it in my template here:
https://github.com/raymestalez/startuplab/blob/master/themes...
- For a very simple commenting system I highly recommend isso:
https://posativ.org/isso/
It's really easy to setup and a pleasure to use. Although personally, I share my posts on HN/reddit, and have a link to the discussion thread automatically embedded in the post footer. That way you don't need any complex setup, and it's better for the exposure.
But then, I don't like Disqus myself. Can't imagine forcing someone else to use it. I'll think about it. Thanks for bringing this up and for everything as well!
Used it to build a few static sites at work and have quite enjoyed it as you get to use React.