Live data from Hacker News

Ask HN: What's a good static site generator to use for a blog in 2018?

news.ycombinator.com

61–70 of 129 posts

Re: Ask HN: What's a good static site generator to use for a blog in 2018?

#61
I would argue, unless you specifically NEED the blog format for some reason, to use whatever you use for your project documentation.

i.e. if you program mostly with python then use Restructured Text and sphinx, etc.

Why? because then you can't say you are unfamiliar with the tools when it comes time to writing docs for your project, something we all suck at doing.

Re: Ask HN: What's a good static site generator to use for a blog in 2018?

#64
I was looking for one a while back and ended up making my own in PHP. I know it's not a popular language anymore but I have a PHP host where I put my websites and it's the quickest to get up and running for me. Anyway, it's on github https://github.com/sachleen/Steady and a website I made using it: https://github.com/sachleen/SacSciOly | http://sacramentoscienceolympiad.com

I tried all the others and none worked for me. Had to install all these new development environments, lots of issues setting up the local servers and building sites, etc. It's not perfect and I probably would not recommend it to anyone else (no docs yet, after all), but it works for me and doesn't take too much time to throw something together if you want simplicity.

Re: Ask HN: What's a good static site generator to use for a blog in 2018?

#65
post #5

This is likely to be an unpopular answer, but the best choice is probably WordPress. I just used it to generate a network of about 40 static sites because (1) it has literally thousands of beautiful, professionally-developed themes for free; (2) same goes for plugins; (3) it's easy to hack if need be; and (4) it probably has one of the easiest-to-use and most-complete content editors, capable of creating both pages a…

I was going to say the same thing, but I would go a step further and say why the heck would you want a static site for a blog in 2018? WordPress is fast, secure, and sooooo easy to use. I'm a professional web developer with 20 years experience and I still use WordPress for my personal blog because it's so simple it saves a ton of time and effort.

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.

Re: Ask HN: What's a good static site generator to use for a blog in 2018?

#68

* Makefile * Pandoc * git You push to a remote on your server, it runs the Makefile via post-receive hook and builds a single, static html file from your Markdown with Pandoc (inlineing everything, images even fonts if you want to) and copies it to the folder served by your nginx.

Hey! This really piqued my interest, could you explain more about the makefile part of this? I currently use Pandoc to convert a folder of .MD files into .HTML files with the same name, and have begun modifying the templates and making use of the YAML metadata you can add. I really like working with markdown like this, and it's perfect for Git.

Here's an example of the kind of build script I use currently: https://github.com/tomhodgins/responsive.style/blob/master/s...

How would you build the contents of the /src folder with pandoc and your makefile?

Edit: for those looking for an example of the result of one of my Markdown -> Pandoc -> Git -> Static Hosting workflows, check out this page:

- Static HTML: https://responsive.style/techniques/child-element

- Markdown Source: https://raw.githubusercontent.com/tomhodgins/responsive.styl...

Re: Ask HN: What's a good static site generator to use for a blog in 2018?

#69
post #68

* Makefile * Pandoc * git You push to a remote on your server, it runs the Makefile via post-receive hook and builds a single, static html file from your Markdown with Pandoc (inlineing everything, images even fonts if you want to) and copies it to the folder served by your nginx.

Hey! This really piqued my interest, could you explain more about the makefile part of this? I currently use Pandoc to convert a folder of .MD files into .HTML files with the same name, and have begun modifying the templates and making use of the YAML metadata you can add. I really like working with markdown like this, and it's perfect for Git. Here's an example of the kind of build script I use currently: https://gi…

Here is a post I made (and generated) about my generator: http://flukus.github.io/building-a-blog-engine.html

It's pretty similar to your shell script but builds are incremental with no extra work. I went with awk for index generation and metadata. There's still plenty of room for improvement but it does most of what I want.

Re: Ask HN: What's a good static site generator to use for a blog in 2018?

#70
Like many others said, Hugo (https://gohugo.io) is super-awesome.

- Single static binary for any platform for a static site generator; couldn't get better. - The fastest too! - The Go templating is great! It should be fairly easy to pick up by anyone knowing any programming language. I love it especially because it reminds me of Lisp. Example: {{ or (and $a $b) $c }}. (For the folks that are not a fan of Lisp, you can right the same as {{ and $a $b | or $c }}.)

Hugo has inbuilt support for Org mode. But I use more Org syntax than the inbuilt version can support. So I came up with an Emacs package that's an Org exporter backend that exports to Hugo/Blackfriday Markdown + front-matter -- ox-hugo. Folks appreciative of Emacs Org mode might want to check out the homepage https://ox-hugo.scripter.co/ "dog-fooded" by the package itself :)

Post reply on HN