Skip to content

Commit

Permalink
Add simple command to generate HTML documentation
Browse files Browse the repository at this point in the history
    tools/generate-htmldoc

will generate the HTML documentation in a container and
write it to openqa-documentation.html

The checklist suggestes to run this command to check if any asciidoc changes
are looking good, instead of the previous non functioning
tools/generate-documentation suggestion.

Issue: https://progress.opensuse.org/issues/110181
  • Loading branch information
perlpunk committed Apr 26, 2022
1 parent 3ba6f96 commit 859272d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/checklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ paths:
"assets/stylesheets/**":
- Consider providing screenshots in a PR comment to show the difference visually
"docs/*.asciidoc":
- Consider generating documentation locally to verify it is rendered correctly using `tools/generate-documentation`
- Consider generating documentation locally to verify it is rendered correctly using `tools/generate-htmldoc`
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ job.json
node_modules
package-lock.json
.tidyall.d/
openqa-documentation.html
4 changes: 4 additions & 0 deletions tools/generate-htmldoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -e

cre=${cre:-"podman"}
$cre run -it --rm -v"$PWD"/:/openqa --workdir /openqa --env GEM_HOME=/home/squamata/.gem registry.opensuse.org/devel/openqa/ci/containers/base:latest tools/generate-htmldoc-in-container
9 changes: 9 additions & 0 deletions tools/generate-htmldoc-in-container
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -e

gem install asciidoctor pygments.rb

asciidoctor_bin=$(command -v asciidoctor) || true
[[ -n "$asciidoctor_bin" ]] || \
for asciidoctor_bin in "${GEM_HOME}"/bin/asciidoctor.ruby*; do :; done
set -x
"$asciidoctor_bin" -o openqa-documentation.html docs/index.asciidoc -d book

0 comments on commit 859272d

Please sign in to comment.