Added bug: blank srcname takes srcname from next line
[rgr-org-mode.git] / publish-babel.org
blobce9d6ee203c30eb9d8619adecb6da58bfa0e9ed7
1 #+TITLE: Tools for publishing Org-babel documentation
2 #+OPTIONS: toc:t h:3 num:nil ^:nil
4 This file contains the code required to export the documentation of Org-babel.
6 * org-babel-documentation Project
8 This defines the =org-babel-documentation= project, for ease of
9 publishing.  Publish a project with =C-c C-e X=.
11 #+begin_src emacs-lisp :results silent
12   (setq org-babel-dir (file-name-directory (or load-file-name buffer-file-name)))
13   (unless (boundp 'org-publish-project-alist)
14     (setq org-publish-project-alist nil))
15   (setq org-publish-project-alist
16         (cons
17          `("org-babel-documentation"
18            :base-directory ,org-babel-dir
19            :base-extension "org"
20            :exclude ,(regexp-opt-group '("org-babel.org" "test-export.org" "test-tangle.org" "test-tangle-load.org"))
21            :publishing-directory ,(expand-file-name "doc" org-babel-dir)
22            :index-filename "org-babel-worg.org"
23            :auto-postamble nil
24            :style "<link rel=\"stylesheet\"href=\"stylesheet.css\"type=\"text/css\">"
25            :publishing-function (org-publish-org-to-html org-publish-org-to-org)
26            :plain-source t
27            :htmlized-source t)
28          org-publish-project-alist))
29 #+end_src
31 * org-babel-documentation stylesheet
33 Calling =org-babel-tangle= in this file will export the css file for
34 the Org-babel documentation.
36 #+begin_src sass :file doc/stylesheet.css :results silent
37   #logo
38     float: right
39     text-align: center
40     max-width: 240px
41     font-size: 8pt
42     #attr
43       margin: -0.5em
44   
45   #subtitle
46     float: center
47     text-align: center
48   
49   #content
50     color: #2e2e2e
51   
52   .outline-text-2
53     margin-left: 2em
54   
55   .outline-text-3
56     margin-left: 2em
57   
58   .outline-text-4
59     margin-left: 2em
60   
61   .outline-text-5
62     margin-left: 2em
63   
64   .outline-text-6
65     margin-left: 2em
66   
67   h3
68     margin-left: 1em
69     color: #000
70   
71   a
72     text-decoration: none
73     color: #4a708b
74   a:hover
75     text-decoration: underline
76 #+end_src