Skip to content

Commit af88a09

Browse files
authored
Merge pull request #487 from jmtd/docs-toc-reorder-sections
auto-generated Docs: add ToC, re-order sections
2 parents 1959b55 + 9e30f2e commit af88a09

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

docs/README.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Red Hat UBI OpenJDK container images
1+
= Red Hat UBI OpenJDK container images
2+
:toc: right
23

34
This is auto-generated documentation for the
45
link:https://www.redhat.com/en/blog/introducing-red-hat-universal-base-image[Red

gendocs.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,16 @@ workdir="$(mktemp -td gendocs.XXXXXX)"
6767
cp ./gendocs.py "$workdir/gendocs.py"
6868
cp ./docs/README.adoc "$workdir/README.adoc"
6969

70-
# documentation for development branches
71-
addToIndex "\n== Development branches ==\n"
72-
for branch in ubi8 ubi9; do
73-
addToIndex "\n=== $branch ===\n"
74-
handleRef "$branch" "$branch"
75-
done
76-
77-
# documentation for tagged releases
78-
addToIndex "\n== Released images =="
79-
for tag in $(git tag -l 'ubi?-openjdk-containers*' | sort -r); do
80-
addToIndex "\n=== $tag ===\n"
81-
handleRef "$tag"
70+
for ubi in ubi9 ubi8; do
71+
UBI=${ubi^^}
72+
addToIndex "\n== $UBI\n"
73+
addToIndex "\n=== development\n"
74+
handleRef "$ubi"
75+
for tag in $(git tag -l "${ubi}-openjdk-containers*" | sort -r); do
76+
version=${tag/${ubi}-openjdk-containers-/}
77+
addToIndex "\n=== $version\n"
78+
handleRef "$tag"
79+
done
8280
done
8381

8482
asciidoctor "$workdir/README.adoc" -o docs/index.html

0 commit comments

Comments
 (0)