diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fe120fde..72fde7ad 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,10 +26,11 @@ jobs: - name: Install dependencies run: ./ci/installdeps.sh - - name: Build API docs + - name: Build API docs and manpages run: | - ./autogen.sh --enable-gtk-doc + ./autogen.sh --enable-gtk-doc --enable-man --enable-man-html make -C apidoc + make manhtml - name: Build and publish jekyll docs uses: helaili/jekyll-action@v2 diff --git a/docs/_config.yml b/docs/_config.yml index ed1c2a63..991d2adc 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -20,9 +20,9 @@ exclude: - prep-docs.sh - vendor/ -# This is a copy of the apidoc/html directory. Run prep-docs.sh before -# jekyll to put it in place. -include: [reference] +# These are copies of the apidoc/html and man/html directories. Run +# prep-docs.sh before jekyll to put it in place. +include: [reference, man] remote_theme: coreos/just-the-docs plugins: diff --git a/docs/index.md b/docs/index.md index db729be3..b1c4da3b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -146,6 +146,10 @@ make install DESTDIR=/path/to/dest The libostree API documentation is available in [Reference](reference/). +## Manual Pages + +The ostree manual pages are available in [Manual](man/). + ## Contributing See [Contributing]({{ site.baseurl }}{% link CONTRIBUTING.md %}). diff --git a/docs/prep-docs.sh b/docs/prep-docs.sh index 2ae15a74..5975d5cc 100755 --- a/docs/prep-docs.sh +++ b/docs/prep-docs.sh @@ -21,3 +21,17 @@ fi echo "Copying $apidocs to $refdir" rm -rf "$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"