Skip to content

Commit bb91cdd

Browse files
authored
docs: improve documentation clarity and fix installation instructions (#8840)
1 parent b6f206b commit bb91cdd

File tree

1 file changed

+54
-25
lines changed

1 file changed

+54
-25
lines changed

docs/reference/readme.md

Lines changed: 54 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,95 @@
1-
The docs are written in [AsciiDoc](https://asciidoc.org/)(`.adoc`). You can view the docs locally in many ways.
1+
## Viewing the Documentation
22

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:
65

7-
## View on IDE
6+
* View in IDE
7+
* Convert to HTML
8+
* Convert to PDF
89

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
1024

11-
## View in HTML
1225
### Install `asciidoctor`
1326

14-
- Mac OS
27+
**macOS:**
28+
1529
```bash
1630
brew install asciidoctor
1731
```
1832

19-
- Ubuntu
33+
**Ubuntu:**
34+
2035
```bash
21-
apt-get install asciidoctor
36+
sudo apt-get install asciidoctor
2237
```
2338

2439
### Convert to HTML
25-
> Tip:`pwd` is `cairo/docs/reference`
2640

27-
- Convert a single file
41+
> **Tip:** run the commands from `cairo/docs/reference`
42+
43+
**Convert a single file:**
44+
2845
```bash
2946
asciidoctor src/Summary.adoc
3047
```
3148

32-
- Convert all files
49+
**Convert all `.adoc` files:**
50+
3351
```bash
3452
asciidoctor src/*.adoc
3553
```
3654

37-
Now `HTML` versions of the documentation will be generated.
55+
HTML files will be created in the same directory as the source files.
3856

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:**
4266

43-
- Mac OS
4467
```bash
45-
brew install asciidoctor
68+
brew install asciidoctor-pdf
4669
```
4770

48-
- Ubuntu
71+
**Ubuntu:**
72+
(`asciidoctor-pdf` is not always available in apt, so RubyGems is used)
73+
4974
```bash
50-
apt-get install asciidoctor
75+
sudo apt-get install ruby ruby-dev
76+
sudo gem install asciidoctor-pdf
5177
```
5278

5379
### Convert to PDF
54-
> Tip: `pwd` is `cairo/docs/reference`
5580

56-
- Convert a single file
81+
> **Tip:** run the commands from `cairo/docs/reference`
82+
83+
**Convert a single file:**
84+
5785
```bash
5886
asciidoctor-pdf src/Summary.adoc
5987
```
6088

61-
- Convert all files
89+
**Convert all `.adoc` files:**
90+
6291
```bash
6392
asciidoctor-pdf src/*.adoc
6493
```
6594

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

Comments
 (0)