top | item 10646508

Hugo – Golang static site editor

154 points| bluemenot | 10 years ago |gohugo.io

45 comments

order

jmduke|10 years ago

I use Hugo for one of my side projects' static sites, and actually just today migrated from using HTML templates to Ace. (I also use it for my blog.)

My pros and cons of Hugo:

+ It's fast.

+ Like, really, really fast. I'm looking at <1s builds for a couple thousand pages which took around 5-8s in Pelican.

+ A lot of really nice out-of-the-box stuff like markdownifying arbitrary strings, rss and sitemaps, etc.

+ Extensible front matter system. (I abuse it to stuff an arbitrary JSON object into each page.)

+ Did I mention how fast it was?

- Debugging is hell. Error messages are unintelligible and generally distract from whatever the actual issue is.

- The structure of a theme is sort of unintuitive, but that may be personal preference.

- Lack of support for more user-friendly templating languages like Jinja2 (this is likely due to speed, but I'd still like the options.)

ajslater|10 years ago

pango (jinja for go) exists, but no one (including me) has stepped up yet to write a plugin for it.

hunvreus|10 years ago

I started looking into Hugo as a faster alternative to Jekyll. Two reasons why you'd disregard the fact that Hugo doesn't have the same support as Jekyll on GitHub pages:

1. You're dealing with thousands or more pages. Jekyll can be slow as heck passed a few hundreds of posts. Benchmarks [1] show that Hugo is way

2. You want to avoid dealing with Ruby. Honestly, every single time I have to install a Ruby app I end up wasting 30 minutes on nonsense (wrong version, dependency hell, ...).

There are many things you can try to improve the speed of your Jekyll site (avoid loops, use Javascript to load some elements/features, leverage some configuration tricks [2]), but Hugo is just flat out much faster and much easier to deploy.

[1]: http://fredrikloch.me/post/2014-08-12-Jekyll-and-its-alterna... [2]: http://scottpatten.ca/2011/11/speeding-up-jekyll-generation....

tvon|10 years ago

> You want to avoid dealing with Ruby, (...)

It annoys me when using a tool require a functional development environment for the ecosystem it is based upon. E.g., ruby-based tools install via 'gem' and node-based tools install via 'npm', both of which are potentially huge hassles.

A nice aspect of go-based tools is that you can always just download a binary.

eloff|10 years ago

I installed and played with Jekyll on a windows box. It was a horrible experience because of installing Ruby and all the dependencies. I'd like to give Hugo a shot just because I know it's Go and it will likely be a single binary with no deps that just works.

senjindarashiva|10 years ago

Thanks for linking my post (the [1]), Id like to add an issue to this though. A few of the latest updates (0.11 seems to have been the fastest so far) to Hugo have made the build time significantly slower, moving it closer to Jekyll. I've yet to test 0.15 though which hopefully improves the performance of Hugo again

liquidmetal|10 years ago

I use hugo on my personal blog at the moment. http://utkarshsinha.com/

A few things I've found interesting are:

- Getting the layout just right takes a bit of tinkering (I mean the layout, theme and include file locations - not the CSS).

- The `hugo` executable is just perfect. hugo server --watch is all you need (plus it's super fast!)

- Also, I'm not a Ruby person. I don't need a whole Ruby ecosystem working on my machine just to parse some markdown.

kxyvr|10 years ago

I'll second these comments about Hugo. I use it with my business website (http://www.optimojoe.com/) and have been extremely happy. As a couple more comments:

- Grab the repo https://github.com/spf13/hugoThemes and flip through the themes. Personally, I don't keep the repository in my Hugo project, but just have a soft link to the base directory. Then, the command `hugo server --theme=MyThemeHere`, let's me instantly see what my website looks like under a new theme.

- The ruby gem s3_website (https://github.com/laurilehmijoki/s3_website) lets me update my Amazon hosted website instantly. Basically, I just run `rm -rf ./public && hugo && s3_website push` after adding a new page and I'm done.

- In any case, like liquidmetal, I'm not a Ruby person, but I was able to easily modify the themes into something that worked well for me. I started using Hugo after running through the other popular static site generators and found Hugo the easiest to get up and running and maintain.

hendry|10 years ago

I found Hugo too complex, so I wrote my own static site generator in Golang. I also didn't like that I couldn't get commonnmark to run simultaneously, so I use `make` & yes it's fast and easy on my brain. https://github.com/kaihendry/natalian

desireco42|10 years ago

I just tried to make a Hugo website and it was easy. I don't think it is super important, but you can't not notice how fast it is.

I am a ruby guy and I really like Middleman, but there are things to like about Hugo. I like how it can pull data files. What I am not sure and need to explore, with Middleman I can implement pulling of the data, I am not sure I could do this with Hugo, but on the other hand, it can pull CSV and JSON from remote, so that is good. Also, taxonomy looks nice, I can see how all this can be useful.

Overall I am pleasantly surprised how well it is done. Some syntax definitely looks weird, but it might be just that I need to adjust to it.

Really happy to discover something new. Excellent work.

elmin|10 years ago

If you need a way of deploying a Hugo site, I highly recommend Stout [1].

1. http://stout.is

sriku|10 years ago

Just migrated my blog to Hugo. I host my blog on s3 directly, so the most time consuming step in the chain is uploading to S3. Stout and surge are nice pointers (thanks).

I'm currently using a simple script that pulls together fossil, s3cmd and gnu parallel to send the content over to s3. Fossil is used to track what changed, s3cmd is the work horse and parallel uploads multiple files at a time.

Shad0w59|10 years ago

I briefly reviewed some static site frameworks and found that Hugo was one of the few that supported complex taxonomies. Anyone had any experience with more complicated sites?

The movie example is similar to what I am after: https://gohugo.io/taxonomies/overview/

PuffinBlue|10 years ago

Hugo is a great tool with a very responsive dev team and friendly community.

I use it myself for a couple of sites and I hope that the team continues to get the recognition it deserves for creating such a useful bit of software.

Incidentally, the license has recently changed to the Apache 2.0 license so hopefully this will encourage even wider adoption/contribution.

rjbrock|10 years ago

This is actually what I am using now on my personal blog (https://brock.io)

I went with hugo because it is very fast, and I didn't need to install any dependencies locally or on my server.

I bought a theme from themeforest and converted it to a hugo theme. It was a great learning experience, but the docs on actually creating a theme were a bit thin.

ngrilly|10 years ago

The title is wrong: Hugo is not a static site editor; it is a static site generator.

ksubedi|10 years ago

I am currently using it for my blog at https://kaushalsubedi.com/ and as someone who just switched from WordPress, the difference is night and day. I threw the site in a CDN and everything loads almost instantly since its all static.

Hugo compiles fast, and the templating system is easy to understand and modify. Only wish it had support for directly compiling it and pushing the changed files from last pushed version via SFTP or even FTP.

jscholes|10 years ago

Just FYI, your navigation menu is an unordered list, but all the links are in one list item instead of multiple ones.

zatkin|10 years ago

That inverted Linux hover icon looks terrible.

tasnimreza|10 years ago

People are claiming it is fast but based on what ? faster development, run time, concurrency, async parallel task handling, based on which parameter you can say it is fast ? is it noticeable for small scale project ?

detaro|10 years ago

Huh, interesting. Doesn't seem to spend any effort on only updating things that need to be updated, but just tries to be fast enough that it doesn't matter if it redoes everything? That approach doesn't look so good once it has to do expensive tasks, like image processing, but for HTML generation it seems to work.

giancarlostoro|10 years ago

I recently started to use Hugo for a not yet done static website I'm working on, I must say I enjoy it. I haven't deployed the site or anything yet since I'm merely experimenting. I kept trying static site generator scripts in Python 2 / Python 3 but they seem to fail for me for one reason or another.

imron|10 years ago

Yep, I'm basically the same - working on a static site, investigated a bunch of alternatives, and Hugo came up the clear winner.

programminggeek|10 years ago

It's not quite live yet, but I'm working on a static site hosting solution http://statichosting.co/. Zip up your site and upload it. That's it.

If you're interested in the beta, hit me up on twitter @_brianknapp.

gntech|10 years ago

I am using Hugo on my personal site http://www.gntech.se and i Like it alot! Coming from Jekyll and Pelican I really appreciate the build speed and the minimal environment setup that is needed! Highly recommended tool!

mhd|10 years ago

Is the speed really that much of a problem? About 90% of all SSG-based blogs I've seen contain about half a dozen posts, as switching/using a SSG was basically the reason someone got (back) into blogging. And then abandoned it six months later.

Animats|10 years ago

It looks like it's basically a markdown to HTML translator, with a scheme for specifying formatting in YAML. It's almost easier to write HTML by hand.

(I still use Dreamweaver 8 for static pages. They render just fine with modern browsers.)

jacquesm|10 years ago

It's easier to write HTML by hand if you only have a few pages. But if you have a few hundred or a few thousand pages a site generator can save you a lot of time and sometimes your sanity.