You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/using-newdoc.adoc
+52-33Lines changed: 52 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,70 +2,82 @@
2
2
3
3
= Using newdoc
4
4
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
+
5
7
== Installing newdoc
6
8
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
8
12
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:
10
16
+
11
17
----
12
18
# dnf copr enable mareksu/newdoc-rs
13
19
----
14
20
15
-
.. Install `newdoc`:
21
+
. Install `newdoc`:
16
22
+
17
23
----
18
24
# dnf install newdoc
19
25
----
20
26
+
21
27
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.
* To install `newdoc` on macOS, use the **Homebrew** package manager:
56
+
=== macOS
49
57
50
-
.. Install the **Homebrew** package manager as described on <https://brew.sh/>.
58
+
To install `newdoc` on macOS, use the **Homebrew** package manager:
51
59
52
-
.. Install `newdoc`:
60
+
. Install the **Homebrew** package manager as described on <https://brew.sh/>.
61
+
62
+
. Install `newdoc`:
53
63
+
54
64
----
55
65
$ brew install msuchane/repo/newdoc
56
66
----
57
67
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:
59
71
60
-
.. Install the Rust toolchain: see <https://rustup.rs/>.
72
+
. Install the Rust toolchain: see <https://rustup.rs/>.
61
73
62
-
.. Install `newdoc`:
74
+
. Install `newdoc`:
63
75
+
64
76
----
65
77
$ cargo install newdoc
66
78
----
67
79
68
-
.. Test that `newdoc` works:
80
+
. Test that `newdoc` works:
69
81
+
70
82
----
71
83
$ newdoc
@@ -87,55 +99,65 @@ WARNING: The container currently does not generate files properly. For details a
87
99
88
100
== Updating newdoc
89
101
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
91
105
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:
93
107
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:
95
111
+
96
112
----
97
113
# dnf --refresh upgrade newdoc
98
114
----
99
115
100
-
* To update `newdoc` installed on openSUSE:
116
+
=== openSUSE
117
+
118
+
To update `newdoc` installed on openSUSE:
101
119
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.
103
121
104
-
.. Refresh repository metadata:
122
+
. Refresh repository metadata:
105
123
+
106
124
----
107
125
# zypper refresh
108
126
----
109
127
110
-
.. Update the package:
128
+
. Update the package:
111
129
+
112
130
----
113
131
# zypper update newdoc
114
132
----
115
133
116
-
* To update `newdoc` installed on macOS using **Homebrew**:
134
+
=== macOS
135
+
136
+
To update `newdoc` installed on macOS using **Homebrew**:
117
137
118
-
.. Update the repository metadata:
138
+
. Update the repository metadata:
119
139
+
120
140
----
121
141
$ brew update
122
142
----
123
143
124
-
.. Update `newdoc`:
144
+
. Update `newdoc`:
125
145
+
126
146
----
127
147
$ brew upgrade newdoc
128
148
----
129
149
130
-
* To update `newdoc` from source, use the `cargo` package manager:
150
+
=== From source on any platform
131
151
132
-
.. Update the Rust toolchain:
152
+
To update `newdoc` from source, use the `cargo` package manager:
153
+
154
+
. Update the Rust toolchain:
133
155
+
134
156
----
135
157
$ rustup update
136
158
----
137
159
138
-
.. Update `newdoc`:
160
+
. Update `newdoc`:
139
161
+
140
162
----
141
163
$ cargo install newdoc
@@ -153,6 +175,8 @@ $ docker pull mrksu/newdoc
153
175
154
176
== Generating documentation files
155
177
178
+
You can generate a documentation file outline that conforms to the modular templates.
179
+
156
180
=== Creating a new module
157
181
158
182
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" \
245
269
+
246
270
This creates the two modules and an assembly that features the include statements for the modules.
247
271
248
-
For more options, see the output of the following command:
0 commit comments