Skip to content

Commit 6634b47

Browse files
author
Marek Suchánek
committed
Subsections in the documentation
1 parent 704c114 commit 6634b47

File tree

1 file changed

+52
-33
lines changed

1 file changed

+52
-33
lines changed

docs/using-newdoc.adoc

Lines changed: 52 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,82 @@
22

33
= Using newdoc
44

5+
The `newdoc` tool generates pre-populated module and assembly files formatted with AsciiDoc, which are used in Red Hat and Fedora documentation. The generated files follow the Modular Documentation guidelines: link:https://redhat-documentation.github.io/modular-docs/[].
6+
57
== Installing newdoc
68

7-
* To install `newdoc` on current Fedora, RHEL 8 or later, or CentOS 8 or later, enable the Copr package repository:
9+
You can install `newdoc` on various operating systems using several package managers.
10+
11+
=== Fedora, RHEL, and CentOS
812

9-
.. Enable the repository:
13+
To install `newdoc` on current Fedora, RHEL 8 or later, or CentOS 8 or later, enable the Copr package repository:
14+
15+
. Enable the repository:
1016
+
1117
----
1218
# dnf copr enable mareksu/newdoc-rs
1319
----
1420

15-
.. Install `newdoc`:
21+
. Install `newdoc`:
1622
+
1723
----
1824
# dnf install newdoc
1925
----
2026
+
2127
The Copr repository distributes packages only for *supported* releases of Fedora. If you have enabled the repository but the package fails to install, check if your Fedora is still supported.
2228

23-
* To install `newdoc` on openSUSE:
29+
=== openSUSE
30+
31+
To install `newdoc` on openSUSE:
2432

25-
.. Enable the Copr package repository:
33+
. Enable the Copr package repository:
2634

27-
*** On openSUSE Leap 15.3:
35+
** On openSUSE Leap 15.3:
2836
+
2937
----
3038
# zypper addrepo \
3139
'https://copr.fedorainfracloud.org/coprs/mareksu/newdoc-rs/repo/opensuse-leap-15.3/mareksu-newdoc-rs-opensuse-leap-15.3.repo'
3240
----
3341

34-
*** On openSUSE Tumbleweed:
42+
** On openSUSE Tumbleweed:
3543
+
3644
----
3745
# zypper addrepo \
3846
'https://copr.fedorainfracloud.org/coprs/mareksu/newdoc-rs/repo/opensuse-tumbleweed/mareksu-newdoc-rs-opensuse-tumbleweed.repo'
3947
----
4048

41-
.. Install `newdoc`:
49+
. Install `newdoc`:
4250
+
4351
----
4452
# zypper refresh
4553
# zypper install --allow-vendor-change newdoc
4654
----
4755

48-
* To install `newdoc` on macOS, use the **Homebrew** package manager:
56+
=== macOS
4957

50-
.. Install the **Homebrew** package manager as described on <https://brew.sh/>.
58+
To install `newdoc` on macOS, use the **Homebrew** package manager:
5159

52-
.. Install `newdoc`:
60+
. Install the **Homebrew** package manager as described on <https://brew.sh/>.
61+
62+
. Install `newdoc`:
5363
+
5464
----
5565
$ brew install msuchane/repo/newdoc
5666
----
5767

58-
* To install `newdoc` from source on a Linux distribution, on macOS, or on Microsoft Windows, use the `cargo` package manager:
68+
=== From source on any platform
69+
70+
To install `newdoc` from source on a Linux distribution, on macOS, or on Microsoft Windows, use the `cargo` package manager:
5971

60-
.. Install the Rust toolchain: see <https://rustup.rs/>.
72+
. Install the Rust toolchain: see <https://rustup.rs/>.
6173

62-
.. Install `newdoc`:
74+
. Install `newdoc`:
6375
+
6476
----
6577
$ cargo install newdoc
6678
----
6779

68-
.. Test that `newdoc` works:
80+
. Test that `newdoc` works:
6981
+
7082
----
7183
$ newdoc
@@ -87,55 +99,65 @@ WARNING: The container currently does not generate files properly. For details a
8799

88100
== Updating newdoc
89101

90-
* To update `newdoc` that is installed from RPM on Fedora, RHEL, or CentOS, use the DNF package manager:
102+
You can update `newdoc` with the package manager that you used to install it.
103+
104+
=== Fedora, RHEL, and CentOS
91105

92-
.. Make sure that you are using a supported release of your Linux distribution. The Copr repository does not publish `newdoc` packages for unsupported distribution releases.
106+
To update `newdoc` that is installed from RPM on Fedora, RHEL, or CentOS, use the DNF package manager:
93107

94-
.. Refresh repository metadata and update the package:
108+
. Make sure that you are using a supported release of your Linux distribution. The Copr repository does not publish `newdoc` packages for unsupported distribution releases.
109+
110+
. Refresh repository metadata and update the package:
95111
+
96112
----
97113
# dnf --refresh upgrade newdoc
98114
----
99115

100-
* To update `newdoc` installed on openSUSE:
116+
=== openSUSE
117+
118+
To update `newdoc` installed on openSUSE:
101119

102-
.. Make sure that you are using a supported release of your Linux distribution. The Copr repository does not publish `newdoc` packages for unsupported distribution releases.
120+
. Make sure that you are using a supported release of your Linux distribution. The Copr repository does not publish `newdoc` packages for unsupported distribution releases.
103121

104-
.. Refresh repository metadata:
122+
. Refresh repository metadata:
105123
+
106124
----
107125
# zypper refresh
108126
----
109127

110-
.. Update the package:
128+
. Update the package:
111129
+
112130
----
113131
# zypper update newdoc
114132
----
115133

116-
* To update `newdoc` installed on macOS using **Homebrew**:
134+
=== macOS
135+
136+
To update `newdoc` installed on macOS using **Homebrew**:
117137

118-
.. Update the repository metadata:
138+
. Update the repository metadata:
119139
+
120140
----
121141
$ brew update
122142
----
123143

124-
.. Update `newdoc`:
144+
. Update `newdoc`:
125145
+
126146
----
127147
$ brew upgrade newdoc
128148
----
129149

130-
* To update `newdoc` from source, use the `cargo` package manager:
150+
=== From source on any platform
131151

132-
.. Update the Rust toolchain:
152+
To update `newdoc` from source, use the `cargo` package manager:
153+
154+
. Update the Rust toolchain:
133155
+
134156
----
135157
$ rustup update
136158
----
137159

138-
.. Update `newdoc`:
160+
. Update `newdoc`:
139161
+
140162
----
141163
$ cargo install newdoc
@@ -153,6 +175,8 @@ $ docker pull mrksu/newdoc
153175

154176
== Generating documentation files
155177

178+
You can generate a documentation file outline that conforms to the modular templates.
179+
156180
=== Creating a new module
157181

158182
1. In the directory where modules are located, use `newdoc` to create a new file:
@@ -245,11 +269,6 @@ $ newdoc --include-in "An assembly for two modules" \
245269
+
246270
This creates the two modules and an assembly that features the include statements for the modules.
247271

248-
For more options, see the output of the following command:
249-
250-
```
251-
$ newdoc --help
252-
```
253272

254273
== Additional resources
255274

0 commit comments

Comments
 (0)