diff --git a/build-docs.sh b/build-docs.sh index 84d6e0eb..857650c3 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -2,6 +2,16 @@ cd "$(dirname "$0")" source ./script/setup.sh +adoc_site_args=() +while test $# -gt 0; do + case "$1" in + --release) + adoc_site_args+=(--attribute relfilesuffix) # Drop html suffix in links + shift;; + *) echo "Unknown arg $1" > /dev/stderr; exit 1;; + esac +done + ./script/install-dep.sh --bundler rm -rf .site && mkdir .site @@ -21,7 +31,11 @@ build-site() { cd .site # Delete "aerospace " prefifx in synopsis sed -E -i '' '/tag::synopsis/, /end::synopsis/ s/^(aerospace | {10})//' aerospace* - bundler exec asciidoctor ./guide.adoc ./commands.adoc ./goodies.adoc + bundler exec asciidoctor \ + "${adoc_site_args[@]}" \ + ./guide.adoc \ + ./commands.adoc \ + ./goodies.adoc cp goodies.html goodness.html # backwards compatibility rm -rf ./*.adoc cd - > /dev/null diff --git a/build-release.sh b/build-release.sh index 2030ee55..84191242 100755 --- a/build-release.sh +++ b/build-release.sh @@ -16,7 +16,7 @@ done ### BUILD ### ############# -./build-docs.sh +./build-docs.sh --release ./build-shell-completion.sh ./generate.sh diff --git a/docs/util/site-attributes.adoc b/docs/util/site-attributes.adoc index 29e4718b..80f08419 100644 --- a/docs/util/site-attributes.adoc +++ b/docs/util/site-attributes.adoc @@ -1,7 +1,6 @@ :idprefix: :idseparator: - :prewrap!: -:relfilesuffix: :sectanchors: :sectlinks: :sectnums: