7 ms·
Hugo is written in go and does exactly this. Has a pretty large community and themes already. http://themes.gohugo.io http://themes.gohugo.io
by sandGorgon 9y ago
Hugo is written in go and does exactly this. Has a pretty large community and themes already.
http://themes.gohugo.io http://themes.gohugo.io
- Keats 9y agoI'm aware of it, the majority of my static sites are still using Hugo since I haven't touched them for ages. The two features I really wanted when I started Gutenbrg were Sass compilation and syntax highlighting built-in: a clean build of my blog with Hugo + Pygments was taking ~20s for ~20 pages at the time and needed virtualenv for Pygments, Node.JS/npm for gulp-sass and the Hugo binary. Hugo now has syntax highlighting in Go so that part should be better though. Themes are supported in Gutenberg but there is only one so far as I didn't want to spend time on that yet. It is pretty fast to port themes though - took me about 10 minutes for Hyde: https://github.com/Keats/hyde https://github.com/Keats/hyde - so I might port ~10 or so next week to get the ecosystem started.
- dualogy 9y ago> with Hugo + Pygments was taking ~20s for ~20 pages at the time That's long! Glad I wrote my own in Haskell (and I'm a Gopher! just did it to get my feet wet in Hs) --- 92 pages in 1s (full rebuild; incremental is of course just a fraction) feels good to me now. http://github.com/metaleap/haxtatic http://github.com/metaleap/haxtatic No CSS magic tooling though. Just don't find vanilla CSS troublesome enough yet =) Edit: I saw you do ~10k pages in ~60s so guess we can see the Rust bonus there now --- certainly beats my extrapolated expected ~5-6k for the same time-frame. (Though I hope you were talking there about complex layouts with component-like-sub-templates / programmatic sub-renderers and date-time formatting, not just dumping-inner-markup-into-outer-markup =)
- piranha 9y agoI would expect lower timings, see https://github.com/piranha/gostatic/blob/master/README.md#speed https://github.com/piranha/gostatic/blob/master/README.md#sp...
- dualogy 9y agoIn Go, sure. In Haskell, for some app use-cases (and I believe static-site-gen is one such) it takes endless patience and tweaking to reach on-par performance with let's say "systems languages". There's scenarios where Haskell's lazy-evaluation may save a running program a lot of unnecessary work theoretically, but in practice I found there's not too many, compared to any eagerly-evaluated program written by a not-a-total-newbie-programmer. Certainly not such batch text-file processing. Then you'd easily parallelize your Go program wherever it makes sense, which in Haskell I didn't do but relied on whatever magic the compiler sprinkles in (if any) via compiler-options =) Also I'm having a rather excessive template system there! As long as it doesn't take 20s for 20p.. or I have to manage 10-100k-page sites..
- smorks 9y agohugo has recently started using a go-based syntax highlighter that's built in, called chroma i believe (https://github.com/alecthomas/chroma https://github.com/alecthomas/chroma), which is supposed to be much faster than pygments. anyways, this project looks very interesting to me, i also currently use hugo for my static sites, but this looks much simpler, and the sass compilation is a nice feature too.
- wwarren 9y agoMore choices is not necessarily a bad thing
- Walkman 9y agoMost of the time is just wasted effort. Yes, more ideas features, use cases, but I usually prefer one thing which is very high quality instead of a lot of small things which are never complete.
- always_good 9y agoBut you're making the wrong assumption that effort is fungible. That if something new didn't exist, that the effort would have instead happened on the old thing. I don't understand why people think this way since those same people certainly don't operate that way. It's just backseat driving how other people spend their free time. Just comes off as a circlejerk.
- sundarurfriend 9y ago> backseat driving how other people spend their free time I like that phrase a lot, captures a lot about comments on OSS projects here in HN and elsewhere.
- zanny 9y agoIts free software, and I can definitely relate to Keats that there are a lot of software projects I'd look at and think about participating in and just concede I don't want to work in my free time in whatever language its written in. Go is definitely one of those languages. My most definitions I have not given it the proper chance, but the lack of generics just turns me off as an avid user of C++ and Rust, in the same way Java has always turned me off for lacking functional features other languages have had for decades. For example, I've often thought about contributing webrtc peer support to various torrent libraries, but when I dig into them (libtorrent, libtransmission, libktorrent, etc) they are all 15+ years old codebases of either C99 or pre-C++03 C++. Considering I'm coming from Rust in my free time I know I would just drop the project within a week because of frustrations with the tooling and language. If I ever really wanted to go the extra mile, I'd use it as a learning experience for some of the Rust GUI bindings and write my own torrent library. Reinventing the wheel yes, but I'd rather spend right now a thousand hours in Rust than a hundred in a really old C code base. I imagine many of these developers like Keats feel the same way.
- ernsheong 9y agoStill, it's bring your own asset pipeline to Hugo, which is a pain. Middleman used to have it, but now its moving away from it.
- HaoZeke 9y agoThe general trend is to decouple the asset-pipeline and the site generators though... Except for the amazing jekyll-assets... Even for jekyll-assets though, it's often faster to run stuff through node-sass first. Also with npm scripts and yarn, the pipeline is exactly what you need and nothing else..
- mi100hael 9y agoAnd Hugo is just a re-write of https://jekyllrb.com/ https://jekyllrb.com/ It's the ultimate Magpie progression. Ruby -> Go -> Rust
- alpb 9y agoI'm not sure how that's true. Do you have a reference on why it's a rewrite of Jekyll, or is it just because Jekyll and Hugo do the same thing and Jekyll was there before Hugo?
- callmeed 9y agoLove Hugo but really wish it supported dynamic page generation like Middleman [0]. [0] https://github.com/gohugoio/hugo/issues/140 https://github.com/gohugoio/hugo/issues/140
- toddmorey 9y agoI kinda hate the template syntax, though. Example: {{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
- Keats 9y agoYeah, that's the worst part of Hugo by far for me. The default template engine is just terrible.
- pwdisswordfish 9y agoWell title should be "Websiter generator No. 3487", so we wouldn't need to write such comments.
- exikyut 9y ago(You have no contact info in your profile, so this has to be a random comment: are you going to reverse the outcome of https://news.ycombinator.com/item?id=15189682 https://news.ycombinator.com/item?id=15189682 anytime? Was just curious, wanted to play and never got to.)
- pwdisswordfish 9y agohttps://news.ycombinator.com/user?id=pwdisswordfish2 https://news.ycombinator.com/user?id=pwdisswordfish2 ?
- exikyut 9y agoHuh. Interesting. ...and it's dead. Wow. :( This really doesn't work. Hah. Thanks for replying though. I have a strong theory about what inspired this account's original owner's username choice. I wonder if you're aware...