An Org Mode based blog engine

#12Widget: Latest articles by user

It should be possible, to define embeddable widgets into org files. Widgets are basically javascript files and are stored in the ./public/javascripts/widgets folder. In an org file, they get embedded like this:

#+WIDGET: latest_articles_by_user

Widgets can use predefined varialbes embraced by two pairs of angel brackets. E.g.:

function LatestArticleByUser(params)
  var author = params.author
  var target = params.target  

  function render() {
    target.innerHTML = "<h1>All Articles for " + author + "</h1>"
  }
}

The following varialbes are available:

  • title
  • author
  • tags
  • date
  • target

The Widget latest_articles_by_user should list the latest (e.g. 5) articles written by the current user.