Poet – displaying an author link

I’m still fiddling around with poet, the node.js blog generator and it’s really easy to add additional meta information like an author link for collaboratively driven sites.

Assuming you want to power a site with poet as a multi-user blog, you can easily attach the meta information in the individual MarkDown files:

{{{
    "title" : "Amazing Tutorial",
    "tags"  : [ "JavaScript" ],
    "category" : "Sanity",
    "date" : "2013-07-20",
    "author" : { "nick" : "Jonathan", "url" : "http://jonathanmh.com"} // additional line
}}

After that, these informations will directly be available inside your templates when you render the posts. Assuming the views from the example repository, these are changes you could make to your template files:

post.jade:

extends layout

block content
	article.post
		h1
			a(href=post.url)
				= post.title
		span.date #{post.date.getFullYear()}.#{post.date.getMonth()+1}.#{post.date.getDate()}
		- if (typeof(post.author) != 'undefined')
			span.author
				p  by 
					a(href="#{post.author.url}") #{post.author.nick}

		div.post.content
			!= post.content
		div.tags
			- each tag in post.tags
				a(href=tagUrl(tag))
					span.label.label-info #{tag}

includes/postSnippet.jade

div.post
.script(console.log(#{post}))

	h1
		a(href=post.url)
			= post.title
	span.date #{post.date.getFullYear()}.#{post.date.getMonth()+1}.#{post.date.getDate()}
	- if (typeof(post.author) != 'undefined')
		span.author
			p  by 
				a(href="#{post.author.url}") #{post.author.nick}
	article.post.content
		!= post.preview
	div.tags
		- if (typeof(post.tags) != 'undefined')
			- each tag in post.tags
				a(href=tagUrl(tag))
					span.label.label-info #{tag}

With this method, you can add all kinds of meta information, that you might like with your posts 🙂

Poet – a node.js blogging platform

Poet is a great little node.js based project that allows you to start a blog in no time.

TLDR; Put a bunch of MarkDown files in a folder and it’s available as a blog to the rest of the world. I just started a new project for JavaScript and I of course wanted to run it on JavaScript, even before GHOST was released, so I went with Poet.

The description of the project by the author made me smile, so I’ll just quickly share this quote: Continue reading “Poet – a node.js blogging platform”

Feedly now allows OPML export for your feeds!

For a moment there I was really worried that feedly would go for a walled garden principle and keep all my feeds locked up, but they announced on their blog, two weeks ago already, that now you can export your feeds as OPML! Yay feedly!

All you have to do is to go to the following address while being logged in to feedly:

http://cloud.feedly.com/#opml

Now I can finally try out Stringer, a self hosted RSS reader!

Retext – Split View MarkDown Editor on Linux

Retext is a great MarkDown editor for beginners and is widely available on the Linux platform.

After introducing Uberwriter I thought it would be time to introduce Retext, which focuses on different features.

retext_markdown_editor_linux

Retext features that are most valuable to me are the display of files in split view and PDF export. It’s a solid editor for both MarkDown and plain text files and I think it’s great for beginners to check the MarkDown syntax right away.

Having said that, it’s much like Mou, my favourite MarkDown editor on Mac OS X, but not as feature rich.

Features I’d love to see in Retext

  • custom CSS for PDF export
  • theming support for the editor itself
  • changing the “copy HTML” functionality so it only exports the body, without surrounding <body> and <html> tags

Installing Retext

Retext is available in most package managers, called retext, so for Debian / Ubuntu you would run:

    sudo apt-get install retext

On Arch Linux you currently have to remember to install python-markdown with it, since it is not automatically required as a dependency:

    sudo yaourt -S markdown-python retext

Speed Project: Time Since Last Post

Speed Projects are a wonderful concept, that I stumbled across through FAT (Free Art & Technology). I’ve been thinking about writing a WordPress plugin for a while to motivate myself and to show site visitors, that my blogs are active.

Turns out, it only took me 25 minutes to produce a really tiny solution, that displays a human readable time since the last blog post was published. The credit is not really with me, but with the great documentation and pre-built WordPress functions. Continue reading “Speed Project: Time Since Last Post”

Using Adobe’s Source Code Pro in Vim


Source Code Pro
is a really nice font for programming, even though it comes from Adobe. I recently banged my head into a wall of too many inconsistent answers on the internet on how to use it inside gVim/MacVim. That’s why I’m just putting down the solution that finally workd for me. Continue reading “Using Adobe’s Source Code Pro in Vim”

Geek / Shell humor: kill

I read about the following in a tweet I simply can not find again, but I thought it was too funny and true not to share. The following represents the input and output of a terminal, likely on Linux or similar:

~: $ happiness
happiness: command not found
~: $ love
love: command not found
~: $ kill
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

Now, why is this funny? For all non-coding people: it basically says that the kill command is the only legit to the system and that it doesn’t understand love or happiness. Kill ends a process, it’s a little like a hardcore task manager. I think I should write some aliases for happiness that would show how good the system is doing and throw some nice words at the user!