|
1 | | -The docs are written in [AsciiDoc](https://asciidoc.org/)(`.adoc`). You can view the docs locally in many ways. |
| 1 | +## Viewing the Documentation |
2 | 2 |
|
3 | | -- View on IDE |
4 | | -- View in HTML |
5 | | -- View in PDF |
| 3 | +The documentation is written in [AsciiDoc](https://asciidoc.org/) (`.adoc`). |
| 4 | +You can view it in several ways: |
6 | 5 |
|
7 | | -## View on IDE |
| 6 | +* View in IDE |
| 7 | +* Convert to HTML |
| 8 | +* Convert to PDF |
8 | 9 |
|
9 | | -- Install `AsciiDoc`plugins in `VSCode` or `Intellij IDEA` |
| 10 | +--- |
| 11 | + |
| 12 | +## View in IDE |
| 13 | + |
| 14 | +Install an AsciiDoc plugin for your IDE: |
| 15 | + |
| 16 | +* **VS Code**: *AsciiDoc by asciidoctor* |
| 17 | +* **IntelliJ IDEA**: *AsciiDoc Plugin* |
| 18 | + |
| 19 | +After installing the plugin, open any `.adoc` file in `cairo/docs/reference`. |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## View as HTML |
10 | 24 |
|
11 | | -## View in HTML |
12 | 25 | ### Install `asciidoctor` |
13 | 26 |
|
14 | | -- Mac OS |
| 27 | +**macOS:** |
| 28 | + |
15 | 29 | ```bash |
16 | 30 | brew install asciidoctor |
17 | 31 | ``` |
18 | 32 |
|
19 | | -- Ubuntu |
| 33 | +**Ubuntu:** |
| 34 | + |
20 | 35 | ```bash |
21 | | -apt-get install asciidoctor |
| 36 | +sudo apt-get install asciidoctor |
22 | 37 | ``` |
23 | 38 |
|
24 | 39 | ### Convert to HTML |
25 | | -> Tip:`pwd` is `cairo/docs/reference` |
26 | 40 |
|
27 | | -- Convert a single file |
| 41 | +> **Tip:** run the commands from `cairo/docs/reference` |
| 42 | +
|
| 43 | +**Convert a single file:** |
| 44 | + |
28 | 45 | ```bash |
29 | 46 | asciidoctor src/Summary.adoc |
30 | 47 | ``` |
31 | 48 |
|
32 | | -- Convert all files |
| 49 | +**Convert all `.adoc` files:** |
| 50 | + |
33 | 51 | ```bash |
34 | 52 | asciidoctor src/*.adoc |
35 | 53 | ``` |
36 | 54 |
|
37 | | -Now `HTML` versions of the documentation will be generated. |
| 55 | +HTML files will be created in the same directory as the source files. |
38 | 56 |
|
39 | | -## View in PDF |
40 | | -### Install `asciidoctor` |
41 | | -> Note: when you install `asciidoctor`, `asciidoctor-pdf` will also be installed. |
| 57 | +--- |
| 58 | + |
| 59 | +## View as PDF |
| 60 | + |
| 61 | +### Install `asciidoctor-pdf` |
| 62 | + |
| 63 | +> **Note:** `asciidoctor-pdf` is **not installed automatically** with `asciidoctor`. |
| 64 | +
|
| 65 | +**macOS:** |
42 | 66 |
|
43 | | -- Mac OS |
44 | 67 | ```bash |
45 | | -brew install asciidoctor |
| 68 | +brew install asciidoctor-pdf |
46 | 69 | ``` |
47 | 70 |
|
48 | | -- Ubuntu |
| 71 | +**Ubuntu:** |
| 72 | +(`asciidoctor-pdf` is not always available in apt, so RubyGems is used) |
| 73 | + |
49 | 74 | ```bash |
50 | | -apt-get install asciidoctor |
| 75 | +sudo apt-get install ruby ruby-dev |
| 76 | +sudo gem install asciidoctor-pdf |
51 | 77 | ``` |
52 | 78 |
|
53 | 79 | ### Convert to PDF |
54 | | -> Tip: `pwd` is `cairo/docs/reference` |
55 | 80 |
|
56 | | -- Convert a single file |
| 81 | +> **Tip:** run the commands from `cairo/docs/reference` |
| 82 | +
|
| 83 | +**Convert a single file:** |
| 84 | + |
57 | 85 | ```bash |
58 | 86 | asciidoctor-pdf src/Summary.adoc |
59 | 87 | ``` |
60 | 88 |
|
61 | | -- Convert all files |
| 89 | +**Convert all `.adoc` files:** |
| 90 | + |
62 | 91 | ```bash |
63 | 92 | asciidoctor-pdf src/*.adoc |
64 | 93 | ``` |
65 | 94 |
|
66 | | -Now `PDF` versions of the documentation will be generated. |
| 95 | +PDF files will be created next to the source `.adoc` files. |
0 commit comments