Render org journal documents with sphinx theme and spacemacs

Posted on Mon 21 March 2016 in spacemacs

Premise

I am an org mode beginner (I am always a beginner, that's why I write blog posts ;)), however I wanted to document how to render nicely my org journal notes

NOTE: org mode for non-spacemacs users is a mode where you can write notes (long or short), todos, with its syntax. You can export, for example to pdf, html, markdown, etc. You have also agendas to organize TODO notes and much more, however it's not the point of this short blog post.

org-journal

org mode has TODO notes, however I wanted to write little journals and long notes, I stumbled upon the org-journal package

The org-journal package is focused on writing time based journals (surprise?)

Just add org-journal in your dotspacemacs-additional-packages I chose to remap the creation of the journal entry with <spc> jc and to search <spc> js Still I have to figure out why <spc> jv behaves like <spc> jc, however I would like to display only the journal.

For non-spacemacs users <spc> is the spacebar key

These are the remappings:

1
2
3
    (spacemacs/set-leader-keys "jc" 'org-journal-new-entry)
    (spacemacs/set-leader-keys "js" 'org-journal-search-forever)
    (spacemacs/set-leader-keys "jv" (kbd "C-u C-c C-j"))

Workflow

With these mappings to create a journal entry and then publish it, you can:

<spc> jc

Write your journal note in org mode

C-c C-e h o

To open in the browser the rendered html from org mode

If you want to render only a subsection of your journal just position your cursor in the subsection and C-c C-e C-s h o

Theme

The rendered document does not look so pretty, Look ma', no css!

https://github.com/fniessen/org-html-themes to the rescue!

Copy one of the themes in your journal folder. In my machine it is $HOME/Documents/journal. I like the readtheorg theme, you can get it here from the repository:

https://github.com/fniessen/org-html-themes/blob/master/setup/theme-readtheorg.setup

On the top of your journal just add:

1
#+SETUPFILE: theme-readtheorg.setup

Re-render with C-c C-e h o to see the preview, enjoy your org mode document with a great theme

You can check http://spacemacs.org/doc/DOCUMENTATION.html to see how it looks!

That's it! Now you have pretty looking document!