17 comments

[ 2.7 ms ] story [ 47.5 ms ] thread
I've wanted to get into Go for a while now. This looks like it will be a good reference. Thanks!
A few years ago, a greybeard of my acquaintance quipped that blogs are this generation's unix shell.

My main nitpick would be that I see a standard blog as requiring a comments facility. Inbuilt, I don't count disqus as having reached the minimum feature level.

I'm also wary of flat file fetishism. Where data is strictly hierarchical and there is only one pattern of access, YAML would suit fine.

In blogs you pretty get into not-hierarchical-really stuff pretty quickly. As soon as the first per-tag or per-author archive page is added, for instance.

Author here. As I mention in the opening lines, I agree that this is really not the most original idea, barely above web frameworks :)

This was an attempt to build the minimal features required to have a useful yet ridiculously simple blog engine. Of course it is very subjective, and to me there are enough options to comment outside the blog itself (this thread here being a good example), I didn't feel this was required. I think a more "controversial" choice may be the absence of a distinct template for the index page. I know this is not acceptable for some, but then there are a few other blog generators to choose from!

I like the trick in Golang marketing, where we get a code full of references to some libraries. Same could be done about other languages.

Oh, look, web server in 5 lines of code, in Java!

    public static void main(String[] args) throws Exception {
        Server server = new Server(80);
        server.setHandler(new HelloWorld());
 
        server.start();
        server.join();
    }
The trick is cheap, but it works!
Of course, the difference is that the Golang code isn't using "some libraries", but the standard library. Well, except for this one, which is also using some custom handlers for gzip and such.
It is also the only one library available for Golang atm.

Actually I think that this example written in Java8 with lambda expressions would be more impressive.

It is also the only one library available for Golang atm.

Except it isn't: http://go-lang.cat-v.org/pure-go-libs

Nice one, a fun list of hobby side projects made by Golang enthusiasts.

I'm gonna drop Jetty and Java altogether in favor of AeroNotix/wedge!

Well, your sarcasm really showed all those people who said you should!
Neat, but I keep wondering with these static generators... why wouldn't you just use pandoc http://johnmacfarlane.net/pandoc/ for the HTML generation?
Building a [static|dynamic] blog in $language is the most classic weekend project for us web-nerds. It's the one field where universal reinvention of wheel is culturally accepted. And it's just fun, I guess.
That's cool, and there's lots of things people should play with: the Go templates for the design and layout, the file system watcher for auto-updates, the file writing, etc.

But when it comes to formats, pandoc is so damn feature-rich, and would allow authors to write in whatever was best for a particular post. Markdown most of the time, restructered text occasionally, TeX rarely.

If anything it would extend the capabilities whilst introducing to the weekend project the execution of an OS command and using stdout and stdin to communicate.

A good addition to the weekend project, and a comprehensive addition to the features of the static blog generator.

I've written a static blog generator, too. But I haven't written a lot of blog posts since then. I realized that I'm missing a browser based backend to edit the posts.

sigh

Well, I edit with vim and git push when I'm ready. But if you really want a browser-based editor, [Draft][0] is very nice.

[0]: https://draftin.com/

I had a similar thing going 8 months ago.

http://gokcehan.github.io/glog/

The upside is that you are able to push your generated site to appengine with a single command afterwards. Too bad even I have switched to jekyll nowadays.