News for hackers. Stuff that matters.
Re:Build a Blog Engine in Go by ghostdiver on Saturday August 03, 2013 @05:13AM (#6151560)
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!
Re:Build a Blog Engine in Go by icebraining on Saturday August 03, 2013 @05:21AM (#6151575)
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.
Re:Build a Blog Engine in Go by ghostdiver on Saturday August 03, 2013 @05:41AM (#6151621)
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.

Re:Build a Blog Engine in Go by icebraining on Saturday August 03, 2013 @06:16AM (#6151689)
It is also the only one library available for Golang atm.

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

Re:Build a Blog Engine in Go by ghostdiver on Saturday August 03, 2013 @06:31AM (#6151719)
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!

Re:Build a Blog Engine in Go by icebraining on Saturday August 03, 2013 @11:16AM (#6152318)
Well, your sarcasm really showed all those people who said you should!
Re:Build a Blog Engine in Go by jacques_chester on Saturday August 03, 2013 @12:56AM (#6151182)
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.

Re:Build a Blog Engine in Go by PuerkitoBio on Saturday August 03, 2013 @10:40AM (#6152187)
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!

Re:Build a Blog Engine in Go by jacques_chester on Saturday August 03, 2013 @11:11AM (#6152297)
To each their own, friend.
Re:Build a Blog Engine in Go by ant512 on Saturday August 03, 2013 @07:31AM (#6151811)
Check out https://bitbucket.org/ant512/gobble

It's a lot like the blogging engine described in the article, but it includes comments/Aksimet/reCAPTCHA and tagging.

Re:Build a Blog Engine in Go by stesch on Saturday August 03, 2013 @05:59AM (#6151650)
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

Re:Build a Blog Engine in Go by PuerkitoBio on Saturday August 03, 2013 @10:43AM (#6152201)
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/

Re:Build a Blog Engine in Go by gokce on Saturday August 03, 2013 @08:47AM (#6151944)
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.

Re:Build a Blog Engine in Go by peterg2 on Friday August 02, 2013 @10:49PM (#6150873)
I've wanted to get into Go for a while now. This looks like it will be a good reference. Thanks!
Re:Build a Blog Engine in Go by buro9 on Saturday August 03, 2013 @05:24AM (#6151582)
Neat, but I keep wondering with these static generators... why wouldn't you just use pandoc http://johnmacfarlane.net/pandoc/ for the HTML generation?
Re:Build a Blog Engine in Go by toyg on Saturday August 03, 2013 @06:25AM (#6151708)
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.
Re:Build a Blog Engine in Go by buro9 on Saturday August 03, 2013 @01:40PM (#6152698)
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.