Merge remote-tracking branch 'srht/master'
[worg.git] / worg-setup.org
blob48eb79cb6bfaf8deec35b300721f461b5a18a6b0
1 #+TITLE:      Worg setup on the https://orgmode.org server
2 #+AUTHOR:     Worg people
3 #+EMAIL:      mdl AT imapmail DOT org
4 #+STARTUP:    align fold nodlcheck hidestars oddeven lognotestate
5 #+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
6 #+TAGS:       Write(w) Update(u) Fix(f) Check(c)
7 #+LANGUAGE:   en
8 #+PRIORITIES: A C B
9 #+CATEGORY:   worg
10 #+OPTIONS:    H:3 num:nil toc:nil \n:nil ::t |:t ^:t -:t f:t *:t tex:t d:(HIDE) tags:not-in-toc
11 #+HTML_LINK_UP:    index.html
12 #+HTML_LINK_HOME:  https://orgmode.org/worg/
14 # This file is released by its authors and contributors under the GNU
15 # Free Documentation license v1.3 or later, code examples are released
16 # under the GNU General Public License v3 or later.
18 * How does Worg publish itself as a website?
20   The server behind https://orgmode.org website takes care of publishing
21   Worg into =HTML=.
23 ** How long does it take for a change to be published?
25 The changes should be available immediately following your =git push=.
27 ** There is a problem.  Can I check the export output?
29 As soon as you push a commit to the worg git repository on the org
30 server, the publishing process is triggered.  You should see the
31 output of the publishing process in your terminal.  If there's a
32 problem, you should see the error in this output.
34 ** Looks like file XXX breaks the export.  What can I do?
36 1. Put this file in the FIXME directory at the root of the Worg
37    repository.  Files in this FIXME directory won't be published.
39 2. Fix the page or contact the author of the page telling him about the
40    problem.
42 ** Where are the "raw" .org files kept?
44 In addition to publishing the html versions of the .org files Worg's
45 git repository, the raw source .org files are also put in
46 [[https://orgmode.org/worg/sources]]. It is nice to make the .org file
47 available for those following a tutorial so that the actual .org
48 file is viewable in addition to reading through the online html
49 version. To do this, simply link to the file in the worg sources directory:
50 - If the page in the git repository is =~/worg.git/path/to/file/file.org=,
51 - Link like so: =https://orgmode.org/worg/sources/path/to/file/file.org=
53 * Are there any writing conventions?
55   Please don't use [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables][file variables]] in your org files.
57 * Can Worg execute code (via Babel)?
59   No.  The default automated export does not allow code execution on the
60   server for obvious security reasons.
62   If you absolutely need code execution:
64   - double-check there is no issue when exporting this file locally
65   - send [[mailto:mdl AT imapmail DOT org][me]] an email mentioning the file you want to export
66   - I will double-check it myself and manually export it if it's okay
68 * What software is available on Worg for Babel code execution?
70   If babel code execution works on your machine, it doesn't mean it will
71   work on the orgmode.org server.  Here is the list of available
72   software on orgmode.org:
74   | Software     |                    Version |
75   |--------------+----------------------------|
76   | GNU Emacs    |                  23.1.90.1 |
77   | shell        |                        3.1 |
78   | R            |                     2.11.1 |
79   | gnuplot-mode |                      O.6.0 |
80   | gnuplot      |                        4.4 |
81   | latex        | pdfeTeX 3.141592-1.21a-2.2 |
83 * What .emacs.el file is used on the server?
85 - https://orgmode.org/worg/code/elisp/emacs.el
87 * I want it for my own server!
89   Here is the detailed recipe:
91   1. Configure your =~/.emacs.el= to know about your publishing projects
92      (more information on publishing [[http://www.gnu.org/software/emacs/manual/html_node/org/Publishing.html][here]] and [[file:org-tutorials/org-publish-html-tutorial.org][here]]).
94   2. Use =(setq org-export-htmlize-output-type 'css)= in =~/.emacs.el=.
96      (Do =C-h v org-export-htmlize-output-type= for more information
97      about this.  Also =C-h v org-export-htmlize-generate-css= might
98      help.)
100   3. Create =~/bin/pull-worg.sh= containing this script:
102      #+BEGIN_SRC sh-mode
103      #!/bin/bash
105      # unless this is already done elsewhere:
106      export PATH=$PATH:/home/you/bin/
108      # go to the place where you pull Worg
109      cd /home/you/git/worg/;
111      # pull worg
112      /home/you/bin/git-pull
113      #+END_SRC
115   4. Create =~/bin/publish-worg.sh= containing this script:
117      #+BEGIN_SRC sh-mode
118      #!/bin/bash
120      # Adapt it to point at your emacs executable
121      /home/you/bin/emacs23 --batch -l ~/.emacs.el -f org-publish-all
122      #+end_src
124   5. Cron the two scripts to run every hour, not at the same time
126      #+BEGIN_SRC generic-mode
127      0 * * * * /home/you/bin/pull-worg.sh >> /dev/null 2>&1
128      30 * * * * /home/you/bin/publish-worg.sh >> /dev/null 2>&1
129      #+END_SRC
131   6. Sit and do something else while your Org repository is
132      automagically exported to HTML