Live data from Hacker News

Hugo – Golang static site editor

gohugo.io

41–47 of 47 posts

Re: Hugo – Golang static site editor

#41
post #29

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…

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 instant…

Useful insight, thanks. Heads up your business website has an invalid link - "Products" is missing a slash and currently points to http://www.optimojoe.comproducts

Re: Hugo – Golang static site editor

#42
post #24

Earlier quoted context omitted.

> I know it's Go and it will likely be a single binary with no deps that just works. It is and it does.

It depends on python-pygments for syntax highlighting, though you can configure it to use front-end based highlighters like highlight.js.

It can optionally use python-pygments for syntax highlighting. It's not a requirement and as you mention alternatives are available.

Re: Hugo – Golang static site editor

#43
post #29

Earlier quoted context omitted.

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 instant…

Useful insight, thanks. Heads up your business website has an invalid link - "Products" is missing a slash and currently points to http://www.optimojoe.comproducts

Thanks for tip on the links! I screwed up my front page template, but it should be fixed and percolating through CloudFront. Thanks again!

Re: Hugo – Golang static site editor

#44
post #36

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…

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

Re: Hugo – Golang static site editor

#45
post #30

Earlier quoted context omitted.

It is awesome to be able to build a binary with go. But despite the recent Node major version upgrades, I've had almost no problems with npm, while I always seem to have issues with Ruby/gem installs. Binaries with no dependencies still win for convenience, but even Go has an ecosystem of libraries to deal with if you need to rebuild something. So I see the three on a spectrum: Go is always awesome, NodeJS usually wo…

> Go is always awesome If you need to build a version of master, or the project doesn't provide a static binary, or you don't wish to trust some random binary on the internet, or you wish to package a Go binary, it suddenly becomes terrible. 1. Build a version of master -- Go does not have a way to version or lock dependencies, so it's possible master will only build on the developers machine. The state of the art so…

>To build a version of master, you have a gemfile / package.json that, if it follows specifications, will correctly tell you everything, down to the version, that should be installed.

You can set specific versions, but the default behavior is to do >= or ~ versions, at least in Node. But you could potentially go in and change the references to =version# to get a version closer to the one the developer built -- but even then there's no guarantee that the latest build hasn't had a more recent download of the packages, with newer versions than those specified in package.json.

But I didn't know this about go package importing. I'm a bit disappointed that they didn't at least make it possible to import @ a particular hash.

You could look at the last check-in and pull versions of each of the dependent repos as of that date, if the latest builds don't work.

>"experienced" and "NodeJS" don't go together so often in my book

Touche.

But I've encountered similar issues with Ruby, TBH (allegedly senior developers who turn out to be slow and not as experienced as I had hoped), and it happens that the JavaScript developers I have around me seem stronger than the Ruby developers. But more and more developers are training every year; I read one article that alleged that junior developers outnumber senior by a factor of something like 18-1 at this point. So I'm statistically likely to be surrounded by an insulating layer of junior developers no matter the language I choose. :)

Re: Hugo – Golang static site editor

#46
post #30

Earlier quoted context omitted.

> Go is always awesome If you need to build a version of master, or the project doesn't provide a static binary, or you don't wish to trust some random binary on the internet, or you wish to package a Go binary, it suddenly becomes terrible. 1. Build a version of master -- Go does not have a way to version or lock dependencies, so it's possible master will only build on the developers machine. The state of the art so…

>To build a version of master, you have a gemfile / package.json that, if it follows specifications, will correctly tell you everything, down to the version, that should be installed. You can set specific versions, but the default behavior is to do >= or ~ versions, at least in Node. But you could potentially go in and change the references to =version# to get a version closer to the one the developer built -- but ev…

The default behaviour is a safe semver selector.

If I type "npm install --save foo", it gives me "^1.2.3" which says "everything compatible with the current version".

If you don't follow semver specification and make incompatible changes, well, :(

You also have the wonderful npm shrinkwrap command (https://docs.npmjs.com/cli/shrinkwrap) which locks you down similar to a Gemfile.lock, but inline with how the npm world works.

Thanks for tooting your horn about being senior while also being factually incorrect about the default behavior of node and not knowing you can use shrinkwrap to leave the loose version specifications but also commit what they actually resolved to on your machine.

Re: Hugo – Golang static site editor

#47
post #26

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 + 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 i…

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