summaryrefslogtreecommitdiffstats
path: root/site/projects/org-blog.org
blob: 251e87726e3c965bea2ed263f9936be33be57004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#+TITLE: git-auto-commit-mode
#+LINK_UP: ../index.html
#+LINK_HOME: ../index.html
#+LINK: src    https://github.com/ryuslash/org-blog
#+LINK: tar_gz https://github.com/ryuslash/org-blog/tarball/master
#+LINK: zip    https://github.com/ryuslash/org-blog/zipball/master

#+INCLUDE: "../header.org" :lines "1-4"
#+INCLUDE: "dlmenu.inc"

* About

  ~org-blog~ is a blog exporter for ~org-mode~ written by David
  O'Toole in 2006. ~org-mode~ has since then changed a bit and it
  seemed that it no longer worked. It also seems to be the only
  viable/acceptable pure-org solution for me, so I'm trying to revive
  it.

** Why

   As stated, it seemed to be out-of-date and packages like [[http://renard.github.com/o-blog/][o-blog]] and
   [[http://www.emacswiki.org/emacs/Blorg][blorg]] didn't work for me, and many others require some external
   tool to work.

* Setup

  Since I've adapted it to work as a normal publishing function for
  org, setting it up is a lot like any other publishing project as
  well:

  #+BEGIN_SRC emacs-lisp
  (setq org-publish-project-alist
      '(("myblog"
         :base-directory "~/location/to/org/files/"
         :publishing-directory "/place/to/export/to/"
         :base-extension "org"
         :publishing-function org-publish-org-to-blog
         :blog-title "some title"
         :blog-description "some description"
         :blog-export-rss t
         :index-title "oni blog"
         :recursive nil
         :table-of-contents nil)))
   #+END_SRC

  Most of these options are very normal project settings and can be
  read about in the documentation for the variable
  ~org-publish-project-alist~. The ~blog-title~, ~blog-description~,
  ~blog-export-rss~ and ~index-title~, however, are used by
  ~org-blog~.

  - ~blog-title~

    This setting is used when exporting RSS. It sets the ~title~ in
    the XML output.

  - ~blog-description~

    This setting is also used when exporting RSS. It sets the
    ~description~ in the XML output.

  - ~blog-export-rss~

    Whether or not you would like an RSS feed to be exported.

  - ~index-title~

    This is used as the title of the blog's index page.

  Apart from these there are also 2 other settings that need your
  attention:

  #+BEGIN_SRC emacs-lisp
  (setq org-blog-directory "~/path/to/blog/org/files/")
  (setq org-blog-unfinished-directory "~/path/to/drafts/")
  #+END_SRC

  These don't have any relevance to the exporting and publishing
  functions, but they're used by the ~org-blog-new-post~ and
  ~org-blog-finish-post~ functions, which help with creating new
  posts.

#+INCLUDE: "../header.org" :lines "5-8"