From af7a6204a6797616782c5f3a0b869677bc7d6223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20B=C3=A4rring?= Date: Mon, 11 Mar 2024 12:47:13 +0100 Subject: [PATCH] Initial commit, only partly tested --- .github/workflows/adoc_build.yml | 10 ++-- cf-conventions.adoc | 27 ++++++++- default-theme-CF-version.yml | 2 + doi-catalog.txt | 7 +++ images/cc-zero.svg | 98 ++++++++++++++++++++++++++++++++ version.adoc | 2 + 6 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 doi-catalog.txt create mode 100644 images/cc-zero.svg diff --git a/.github/workflows/adoc_build.yml b/.github/workflows/adoc_build.yml index b1273f77..8175a2b3 100644 --- a/.github/workflows/adoc_build.yml +++ b/.github/workflows/adoc_build.yml @@ -50,14 +50,16 @@ jobs: - name: Set "final" tag and date-time formatting if: github.event_name == 'release' run: | - echo "FINAL_TAG=-a final" >> "$GITHUB_ENV"; echo "DATE_FMT=+%d %B, %Y" >> "$GITHUB_ENV" + echo "DATE_FMT=+%d %B, %Y" >> "$GITHUB_ENV" + echo "DOI=$(tail -n 1: doi-catalog.txt |cut -d : -f 2)" >> $GITHUB_ENV + echo "FINAL_TAG=-a final" >> "$GITHUB_ENV"; # Build cf-conventions.html using the Analog-inc asciidoctor-action - name: Build cf-conventions.html uses: Analog-inc/asciidoctor-action@v1.2 with: - shellcommand: 'asciidoctor --verbose ${FINAL_TAG} -a docprodtime=$(date -u ${DATE_FMT}) cf-conventions.adoc -D conventions_build; cp -r images conventions_build' - # Patch the cfconventions.org link - - run: sed -E -i 's+(See )(https://cfconventions.org)( for further information.)+\1\2\3+' ./conventions_build/cf-conventions.html + shellcommand: 'asciidoctor --verbose ${FINAL_TAG} -a doi=${DOI} -a docprodtime=$(date -u ${DATE_FMT}) cf-conventions.adoc -D conventions_build; cp -r images conventions_build' + # Remove the empty "Colophon" title and toc entry from the html version + - run: sed -i '/>  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/version.adoc b/version.adoc index be4d63de..49a834bf 100644 --- a/version.adoc +++ b/version.adoc @@ -12,8 +12,10 @@ or with the commandline switch `-a final`. ifdef::final[] :current-version: {version} :current-version-as-attribute: {version} +:doi-text: {nbsp}{nbsp}{nbsp}DOI: link:https://doi.org/{doi}[{doi}] endif::[] ifndef::final[] :current-version: {version} draft :current-version-as-attribute: {version}-draft +:doi-text: has not yet a DOI assigned. endif::[]