News for hackers. Stuff that matters.
Re:Show HN: Gutenberg – A static site engine as a single exe... by sandGorgon on Thursday October 19, 2017 @10:22AM (#15508109)
Hugo is written in go and does exactly this. Has a pretty large community and themes already.

http://themes.gohugo.io

Re:Show HN: Gutenberg – A static site engine as a single exe... by Keats on Thursday October 19, 2017 @10:47AM (#15508362)
I'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 - so I might port ~10 or so next week to get the ecosystem started.

Re:Show HN: Gutenberg – A static site engine as a single exe... by dualogy on Thursday October 19, 2017 @11:54AM (#15508976)
> 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

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 =)

Re:Show HN: Gutenberg – A static site engine as a single exe... by piranha on Thursday October 19, 2017 @11:08PM (#15513301)
Re:Show HN: Gutenberg – A static site engine as a single exe... by dualogy on Friday October 20, 2017 @07:24AM (#15514890)
In 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..

Re:Show HN: Gutenberg – A static site engine as a single exe... by smorks on Thursday October 19, 2017 @12:06PM (#15509096)
hugo has recently started using a go-based syntax highlighter that's built in, called chroma i believe (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.

Re:Show HN: Gutenberg – A static site engine as a single exe... by mi100hael on Thursday October 19, 2017 @12:51PM (#15509488)
And Hugo is just a re-write of https://jekyllrb.com/

It's the ultimate Magpie progression.

Ruby -> Go -> Rust

Re:Show HN: Gutenberg – A static site engine as a single exe... by alpb on Thursday October 19, 2017 @06:12PM (#15511983)
I'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?
Re:Show HN: Gutenberg – A static site engine as a single exe... by wwarren on Thursday October 19, 2017 @10:48AM (#15508371)
More choices is not necessarily a bad thing
Re:Show HN: Gutenberg – A static site engine as a single exe... by Walkman on Thursday October 19, 2017 @12:46PM (#15509448)
Most 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.
Re:Show HN: Gutenberg – A static site engine as a single exe... by zanny on Thursday October 19, 2017 @03:16PM (#15510761)
Its 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.

Re:Show HN: Gutenberg – A static site engine as a single exe... by always_good on Thursday October 19, 2017 @01:01PM (#15509565)
But 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.

Re:Show HN: Gutenberg – A static site engine as a single exe... by sundarurfriend on Friday October 20, 2017 @01:20AM (#15513674)
> 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.

Re:Show HN: Gutenberg – A static site engine as a single exe... by saghm on Thursday October 19, 2017 @05:35PM (#15511738)
Just because you prefer other things doesn't mean it's wasted effort. Even if no one else used it (which isn't the case here), there's nothing wrong with working on a side project just to build your skills.
Re:Show HN: Gutenberg – A static site engine as a single exe... by Walkman on Friday October 20, 2017 @05:27AM (#15514533)
that's totally different. You can do whatever you want in your free time as a hobby, or whatever reason, but I mean if it's not just for joy, and anything, and you want to solve a real problem, it would be better for everybody if you would just join to an already existing community and improve the thing already exists.

So basically I don't find it a valid reason to make an entirely new thing because the existing solutions did not worked the way you wanted.

Re:Show HN: Gutenberg – A static site engine as a single exe... by Keats on Friday October 20, 2017 @12:43PM (#15517156)
The issue with that reasoning is that according to you, everyone should just work on the first popular tool and never create a new one. People like different things and cramming all opinions into one thing, if even possible, usually don't work out.

I mentioned it in another comment (https://news.ycombinator.com/item?id=15511028) but none of the things I wanted to change in Hugo could have been done.

Re:Show HN: Gutenberg – A static site engine as a single exe... by toddmorey on Thursday October 19, 2017 @07:51PM (#15512526)
I kinda hate the template syntax, though.

Example:

{{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}

Re:Show HN: Gutenberg – A static site engine as a single exe... by Keats on Friday October 20, 2017 @02:57AM (#15513980)
Yeah, that's the worst part of Hugo by far for me. The default template engine is just terrible.
Re:Show HN: Gutenberg – A static site engine as a single exe... by thenomad on Friday October 20, 2017 @10:59AM (#15516287)
Are there non-default ones? I also don't love Hugo's template engine.
Re:Show HN: Gutenberg – A static site engine as a single exe... by Keats on Friday October 20, 2017 @12:24PM (#15517016)
There are 2 others: https://gohugo.io/templates/alternatives/ but I don't like them either x)
Re:Show HN: Gutenberg – A static site engine as a single exe... by callmeed on Thursday October 19, 2017 @01:00PM (#15509553)
Love Hugo but really wish it supported dynamic page generation like Middleman [0].

[0] https://github.com/gohugoio/hugo/issues/140

Re:Show HN: Gutenberg – A static site engine as a single exe... by ernsheong on Thursday October 19, 2017 @11:50AM (#15508934)
Still, 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.
Re:Show HN: Gutenberg – A static site engine as a single exe... by HaoZeke on Tuesday October 24, 2017 @02:42AM (#15539697)
The 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..
Re:Show HN: Gutenberg – A static site engine as a single exe... by pwdisswordfish on Friday October 20, 2017 @07:53AM (#15515022)
Well title should be "Websiter generator No. 3487", so we wouldn't need to write such comments.
Re:Show HN: Gutenberg – A static site engine as a single exe... by exikyut on Saturday October 21, 2017 @10:15PM (#15524782)
(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 anytime? Was just curious, wanted to play and never got to.)
Re:Show HN: Gutenberg – A static site engine as a single exe... by pwdisswordfish on Tuesday October 24, 2017 @05:10AM (#15540251)
Re:Show HN: Gutenberg – A static site engine as a single exe... by exikyut on Tuesday October 24, 2017 @09:01PM (#15546523)
Huh. 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...