hdoc-tools
v0.66.0
Published
Hornbill HDocBook Development Support Tool
Keywords
Readme
hdoc-tools
Hornbill HDocBook Development Support Tool.
Usage
hdoc argument switches
Arguments
The arguments available to this command-line tool are as follows.
help
Outputs available arguments and switches.
init
Initializes a new HDocBook project from a template, using runtime input variables.
createDocs
Creates folder structure and markdown documents as defined in the HDocBook navigation item links
stats
Returns statistics regarding the book you are working on:
- Document ID
- Version
- Title
- Description
- Public Source
- Total Book Word Count
- Number of Markdown Files in the Book
- Number of Static HTML Files in the Book
If the -v switch is provided, then more verbose output is output, which includes a list of each MD and HTML file found, the file sizes, and file-specific word count.
The book statistics do not include counts for any externally hosted content injected into the book content using the [[INCLUDE]] tags.
build
Performs a local build of the book, validates the links and static content are present and correct and outputs as a ZIP file.
If the -v switch is provided, then a more verbose output is provided, which includes a list of all HTML files created and checked for embedded links and static content.
Use the --set-version argument to set the version number of the built book.
Use the --no-color argument to remove any color control characters from the output.
Use the --no-links argument to skip link output to CLI during validation.
validate
Performs a minimum local build of the book, then validates the links and static content are present and correct.
If the -v switch is provided, then a more verbose output is provided, which includes a list of all HTML files created and checked for embedded links and static content.
Use the --set-version argument to set the version number of the built book.
Use the --no-color argument to remove any color control characters from the output.
Use the --no-links argument to skip link output to CLI during validation.
serve
Starts a local web server on port 3000, serving the book content.
To preview the documentation in a browser, you can open a terminal window and run the dev preview server with the
command hdoc serve and in a local browser go to the URL http://localhost:3000
Installation
npm install hdoc-tools -g
Releasing
Releases are fully automated via GitHub Actions (.github/workflows/release.yml):
- Add a
## [X.Y.Z]section for the new version at the top of CHANGELOG.md. - Bump
versionin package.json to match. - Push (or merge) to
main.
The workflow detects the new version (no vX.Y.Z tag yet), publishes to npm using
trusted publishing (OIDC — no npm tokens), creates the git tag and GitHub Release with
the changelog section as notes, and announces the release in the Hornbill workspace.
Pushes to main without a version bump do nothing. Re-running a failed workflow is
safe — each step is guarded by what already exists on npm and in tags.
