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
Then continue to [install Ruby gems](#installing-ruby-gems).
17
-
18
18
* In RHEL perform:
19
19
20
20
dnf module enable ruby:2.7
@@ -23,7 +23,6 @@ Install the required tools.
23
23
pip3 install linkchecker
24
24
25
25
If you prefer to install Python packages into home folder rather than system-wide folder (requires root), then add `--user` option to the `pip3` command.
26
-
Then continue to [install Ruby gems](#installing-ruby-gems).
27
26
28
27
* In MacOS, required tools can be installed via brew but instead of "make" call "gmake":
29
28
@@ -35,82 +34,74 @@ Install the required tools.
35
34
36
35
xcode-select --install
37
36
38
-
Then continue to [install Ruby gems](#installing-ruby-gems).
39
-
40
-
### Installing Ruby gems
41
-
37
+
2. Install Ruby gems.
42
38
In the `foreman-documentation` folder, run:
43
39
44
-
make prep
40
+
make prep
45
41
46
42
### Building HTML artifacts
47
43
48
-
Run `make` or `make html`, either in the `guides/` directory or in `doc-*/` subdirectories.
49
-
When you run "make" in `guides/`, it builds all guides.
50
-
51
-
To speed up the build process, make sure to use `-j` option. Ideally, set it to amount of cores plus one:
52
-
53
-
make -j9
54
-
55
-
An alias is often useful:
56
-
57
-
alias make="make -j$(nproc)"
58
-
59
-
The final artifacts can be found in the `./build` subdirectory.
60
-
Note that GNU Makefile tracks changes and only builds relevant artifacts.
61
-
To trigger a full rebuild, use `make clean` to delete the build directory and start over.
62
-
63
-
### Builds
64
-
65
-
There are the following builds:
44
+
To build HTML artifacts, run the `make` command.
45
+
If you run the command in the `guides/` directory, all guides are built.
46
+
If you run the command in a`doc-*/` subdirectory, a single guide is built.
66
47
67
48
-`make BUILD=foreman-el` - This builds guides for Foreman on Enterprise Linux (EL) without the Katello plugin.
68
49
This is the default build for `make html`.
69
50
-`make BUILD=foreman-deb` - This builds guides for Foreman on Debian/Ubuntu without the Katello plugin.
70
51
-`make BUILD=katello` - This builds guides for Foreman on EL with the Katello plugin.
71
52
-`make BUILD=satellite` - This builds a preview of guides for Satellite.
72
53
-`make BUILD=orcharhino` - This builds a preview of guides for orcharhino.
54
+
-`make browser` (run from a `doc-*/` subdirectory) - This builds the HTML version and opens a new tab in a browser.
73
55
74
-
### Building a single guide
75
-
76
-
Few additional make targets are available on the guide level.
77
-
To quickly build HTML version and open new tab in a browser do:
78
-
79
-
cd doc-Provisioning_Hosts
80
-
make browser
81
-
82
-
### Checking links
56
+
To view the built HTML artifact, go to the `./build` subdirectory and locate the `*.html` file you need.
57
+
Note that GNU Makefile tracks changes and only builds relevant artifacts.
58
+
To trigger a full rebuild, use `make clean` to delete the build directory and start over.
83
59
84
-
It's also possible to check links; the following command will check all links except example.com domain:
60
+
To speed up the build process, make sure to use `-j` option. Ideally, set it to amount of cores plus one:
85
61
86
-
make linkchecker
62
+
make -j9
87
63
88
-
#### Disabling the linkchecker for a specific URL pattern
64
+
An alias is often useful:
89
65
90
-
You can disable the linkcheck job for specific URL pattern, for example for unreleased downstream documentation or to exclude URLs that cannot resolve by design.
91
-
Append your pattern to `guides/common/linkchecker.ini`.
You can build Foreman documentation locally using a container image.
97
71
This requires the cloned git repository plus an application such as Podman or Docker to build and run container images.
98
72
73
+
Run the following commands from your `foreman-documentation` directory:
74
+
99
75
1. Build container image:
100
76
101
77
podman build --tag foreman_documentation .
102
78
103
-
2. Build Foreman documentation.
104
-
Run this command in your `foreman-documentation` repository:
79
+
2. Build Foreman documentation:
105
80
106
81
rm -rf guides/build && podman run --rm -v $(pwd):/foreman-documentation foreman_documentation make html
107
82
108
83
On SELinux enabled systems, run this command:
109
84
110
85
rm -rf guides/build && podman run --rm -v $(pwd):/foreman-documentation:Z foreman_documentation make html
111
86
87
+
## Testing link integrity with linkchecker
88
+
89
+
The repository includes a linkchecker GitHub Action to check the validity of links used in the documentation.
90
+
91
+
### Running a link check manually
92
+
93
+
You can check links in your local repository.
94
+
The following command checks all links except example.com domain:
95
+
96
+
make linkchecker
97
+
98
+
### Disabling the linkchecker for a specific URL pattern
99
+
100
+
You can disable the linkcheck job for specific URL pattern, for example for unreleased downstream documentation or to exclude URLs that cannot resolve by design.
101
+
Append your pattern to `guides/common/linkchecker.ini`.
0 commit comments