https://github.com/vshn/antora-nav-orphans-checker
Program checking for orphan files not included in the nav.adoc file of an Antora documentation site.
https://github.com/vshn/antora-nav-orphans-checker
antora
Last synced: 2 months ago
JSON representation
Program checking for orphan files not included in the nav.adoc file of an Antora documentation site.
- Host: GitHub
- URL: https://github.com/vshn/antora-nav-orphans-checker
- Owner: vshn
- Created: 2023-03-16T15:16:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-10T17:29:35.000Z (3 months ago)
- Last Synced: 2025-03-10T18:40:26.347Z (3 months ago)
- Topics: antora
- Language: Go
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Antora Navigation Orphans Checker
This project contains a Python and a Go implementation of a program used to check whether the `nav.adoc` file of an Antora documentation set contains orphans.
"Orphans" in this context, are files that exist in the `modules/ROOT/pages` folder but who aren't referenced on the `nav.adoc` file.
== Usage
Use the tool as follows:
[source,bash]
--
$ go build
$ ./antora-nav-orphans-checker -help
Usage of ./antora-nav-orphans-checker:
-antoraPath string
Path to Antora document sources (default "/docs")
-filename string
File to analyze (default "/modules/ROOT/nav.adoc")
-module string
Module to analyze (default "ROOT")
--By default the tool checks the "ROOT" module in the "/docs" folder.
[source,bash]
--
./antora-nav-orphans-checker -antoraPath fixture
--The tool exits with code 1 if some files are missing. The list of files is printed in the console. If no files are missing, the tool exists with code 0.
You can specify other modules (you must specify the corresponding `-filename` argument in that case too):
[source,bash]
--
./antora-nav-orphans-checker -antoraPath fixture -module AnotherModule -filename /modules/AnotherModule/nav.adoc
--The `-filename` argument can be a different file to check; in this case it is assumed to be a standard Asciidoc file, where files are referenced with `include::` instead of `xref:`.
[source,bash]
--
./antora-nav-orphans-checker -antoraPath fixture -filename /document.adoc
--== Container
This project generates a container that can be used as follows:
[source,bash]
--
podman run --rm --volume "${PWD}":/antora ghcr.io/vshn/antora-nav-orphans-checker:main -antoraPath /antora/docs
--== Unit Tests
Run the suite of unit tests:
[source,bash]
--
go test
--