There are several tools and workflows for writing a blog, after reading the article writing and blogging on org-mode, We noticed blorg as an alternative, after reviewing the blorg page It was discouraging to notice blorg was not going to be maintained, we needed to start looking otherwise. Writing and publishing from emacs-muse is easy. First we were trying to know how the emacs-muse authors were publishing their blogs, we found out by the examples they were using blosxom (it uses a python script for publishing), We were looking for a tool that uses just emacs. Then after googling We were directed to muse-journal, after trying it, muse-journal does the job, then We decided for muse-blog after comparing it against muse-journal, was a very difficult decision, both tools do the same, also the documentation for both tools is scarce but It seems even the emacs-muse authors do not encourage muse-journal enough.

Our Goal:

It was not an easy work starting to work on muse-blog, perhaps the difficulty came as part of our goal.

This is going to be our workflow:

We are going to improve our workflow according to our use.

Those were the modifications We have done to our emacs-muse configuration file1, We have adapted It to the header and footer We

got when We created our website.

  1. Install muse-blog y add It to the load-path.
  2. Put muse-blog as a requirement on our emacs-muse configuration file.
(require 'muse-blog)
  1. Deriving the style 'my-blog-xhtml', this style is based on 'blog-xhtml'
(muse-derive-style "my-blog-xhtml" "xhtml"
                   :header "~/projects/yoursite-page-muse/variant-creative.header"
                   :footer "~/projects/yoursite-page-muse/variant-creative.footer"
                   :date-format 'muse-blog-html-date-format
                   :entry-template 'muse-blog-html-entry-template
                   :before-end 'muse-blog-html-munge-buffer)
  1. Variables customization.
    • On the variable 'muse-blog-html-entry-template' We are adding a link in the title, that is the link pointing out to our blog entry.
    • On the variable 'muse-blog-rss-header' We are adding 'lastBuildDate'.
    • On the variable 'muse-blog-rss-entry-template' We are adding a link at the end of the entry description.
;; muse-blog variables
"<div class=\"entry\">
  <a id=\"%anchor%\" style=\"text-decoration: none\">&nbsp;</a>
  <div class=\"entry-body\">
    <div class=\"entry-head\">
      <div class=\"entry-date\">
        <span class=\"date\">%date%</span>
      <div class=\"entry-title\">
        <a href=\"%anchor%\">
    <div class=\"entry-text\">
  "<\?xml version=\"1.0\" encoding=\"<lisp>
<rss version=\"2.0\">
    <title><lisp>(muse-publishing-directive \"title\")</lisp></title>
    <link><lisp>(concat (muse-style-element :base-url)
                        (concat (muse-page-name)
    <description><lisp>(muse-publishing-directive \"desc\")</lisp></description>
    <language><lisp>(or (muse-publishing-directive \"lang\") \"en-us\")</lisp></language>
    <lastBuildDate><lisp>(format-time-string \"%Y%m%dT%H:%M:%S%z\" (current-time))</lisp></lastBuildDate>
    <generator>Emacs Muse</generator>\n\n"
  "Header used for publishing RSS 2.0 files. This may be text or
a filename.")
  "\n    <item>
      <description><![CDATA[%text%\n\n<a href=\"%anchor%\">Leer artículo completo en kipuamutay</a>]]></description>
      <author><lisp>(muse-publishing-directive \"author\")</lisp></author>
      <guid isPermaLink=\"true\">%link%#%anchor%</guid>
  "Template used to publish individual blog entries as RSS 2.0.
This may be text or a filename.")

After having modified our emacs-muse configuration file, we can write down our first entry on our blog. Write it down as any other emacs-muse document. After that create the index document in the folder blog2, on the index document add the blog entry short description3, when finished writing down the short description, publish the index document with the style 'my-blog-xhtml'4. Besides that We are going to publish the same file with the style 'blog-rss'5. Finally We must modify on the html/xml output the links to point out the article web address6.

Every entry on the blog index should have the following structure.

* 20110630-12:34:46 Publishing our first entry
The pretest for emacs 24 is going to start today according to the
emacs list...

Developing Article

The snippet that help us with the structure is below:

# -*- mode: snippet -*-
# name: blog
# key: blog
# --
* `(insert (format-time-string "%Y%m%d-%H:%M:%S"))` ${1:title}

1. It comes from our article Easy website with emacs-muse.

2. http://www.kipuamutay.com/en/blog.

3. For this purpose We have created a snippet (yasnippet).

4. The file contains, a short description for every blog entry.

5. This outputs the xml file for the news reader.

6. This is still cumbersome, We are using ediff for modifying just the last entry.

Last change: 22.11.2011 21:58

blog comments powered by Disqus