docs: Publish man pages

Make a copy of `man/html` to `docs/man` and then configure Jekyll to
include it verbatim like the API docs. A link is added to the main index
and the necessary commands are added to the github docs workflow.
This commit is contained in:
Dan Nicholson 2022-04-08 15:30:07 -06:00
parent 8032e89d33
commit 9b6a8171c5
4 changed files with 24 additions and 5 deletions

View File

@ -26,10 +26,11 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: ./ci/installdeps.sh run: ./ci/installdeps.sh
- name: Build API docs - name: Build API docs and manpages
run: | run: |
./autogen.sh --enable-gtk-doc ./autogen.sh --enable-gtk-doc --enable-man --enable-man-html
make -C apidoc make -C apidoc
make manhtml
- name: Build and publish jekyll docs - name: Build and publish jekyll docs
uses: helaili/jekyll-action@v2 uses: helaili/jekyll-action@v2

View File

@ -20,9 +20,9 @@ exclude:
- prep-docs.sh - prep-docs.sh
- vendor/ - vendor/
# This is a copy of the apidoc/html directory. Run prep-docs.sh before # These are copies of the apidoc/html and man/html directories. Run
# jekyll to put it in place. # prep-docs.sh before jekyll to put it in place.
include: [reference] include: [reference, man]
remote_theme: coreos/just-the-docs remote_theme: coreos/just-the-docs
plugins: plugins:

View File

@ -146,6 +146,10 @@ make install DESTDIR=/path/to/dest
The libostree API documentation is available in [Reference](reference/). The libostree API documentation is available in [Reference](reference/).
## Manual Pages
The ostree manual pages are available in [Manual](man/).
## Contributing ## Contributing
See [Contributing]({{ site.baseurl }}{% link CONTRIBUTING.md %}). See [Contributing]({{ site.baseurl }}{% link CONTRIBUTING.md %}).

View File

@ -21,3 +21,17 @@ fi
echo "Copying $apidocs to $refdir" echo "Copying $apidocs to $refdir"
rm -rf "$refdir" rm -rf "$refdir"
cp -r "$apidocs" "$refdir" cp -r "$apidocs" "$refdir"
# Make sure the manpages have been generated and copy them to the man
# directory.
manhtml="$topdir/man/html"
mandir="$docsdir/man"
if [ ! -d "$manhtml" ]; then
echo "error: HTML manpages $manhtml have not been generated" >&2
echo "Rebuild with --enable-man option and run `make manhtml`" >&2
exit 1
fi
echo "Copying $manhtml to $mandir"
rm -rf "$mandir"
cp -r "$manhtml" "$mandir"