Debian Codegraph @

doc/README

raw
1 HOW-TO: Compiling the Cgreen Guide
2 ===================================
3
4 The Cgreen Guide Book is written using Asciidoctor. Asciidoctor builds
5 upon the asciidoc format, is 100 times faster than the Python asciidoc
6 toolchain and can generate PDF in the same step. Writing in
7 asciidoc(tor) is a wonderful way to write textual docs. Please visit
8 http://www.asciidoctor.org for more information.
9
10 You also need a source-highlighter as described in
11 (http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#source-code)
12
13 There are a number of source examples in the documentation that are
14 automatically included from the `tutorial_src` subdirectory. They are
15 kept separate so that they can be compiled to ensure that they
16 actually are correct. Then all, or a part of, the file can be
17 included. To do that, go to the subdirectory, ensure you have the
18 correct version of cgreen in your path and do `make`.
19
20 The one drawback of this strategy is that you cannot read the source
21 of the examples in a raw asciidoc-conversion, like on github, since it
22 requires including other files, which is not allowed for security
23 reasons. So we need to generate the documentation and upload it to
24 `cgreen-devs.github.io`. Ensure you have *asciidoctor* installed
25 (`sudo apt install asciidoctor` or similar).
26
27 It is preferred to generate multi-page HTML, which currently
28 asciidoctor does not do natively yet. There is an extension in the
29 asciidoctor-extension-lab, which I have not
30 tried. [asciidoctor-chunker](https://github.com/wshito/asciidoctor-chunker)
31 works well, but requires installing Roswell (a Common Lisp
32 environment). If you use asciidoctor-chunker, first generate the HTML with asciidoctor
33
34 asciidoctor cgreen-guide-en.asciidoc -o html/cgreen-guide-en.html
35
36 then chunk it using asciidoctor-chunker (assuming some convenience
37 links in your path...)
38
39 asciidoctor-chunker html/cgreen-guide-en.html