diff --git a/build-arc-doku.sh b/build-arc-doku.sh new file mode 100755 index 0000000..9114781 --- /dev/null +++ b/build-arc-doku.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# convert markdown adrs to asciidoc +./dtcw exportMarkdown + +# create a special include file which references all adrs +./dtcw specialCollectIncludes + +# build the microsite +./dtcw generateSite diff --git a/docToolchainConfig.groovy b/docToolchainConfig.groovy index 6b5647e..e774ddb 100644 --- a/docToolchainConfig.groovy +++ b/docToolchainConfig.groovy @@ -55,6 +55,7 @@ taskInputsFiles = [] // Configuration for customTasks // create a new Task with ./dtcw createTask customTasks = [ + 'documentation/scripts/specialCollectIncludes.gradle', /** customTasks **/ ] @@ -129,7 +130,7 @@ microsite.with { // the menu of the microsite. A map of [code:'title'] entries to specify the order and title of the entries. // the codes are autogenerated from the folder names or :jbake-menu: attribute entries from the .adoc file headers // set a title to '-' in order to remove this menu entry. - menu = [adr: 'Tech Decisions (ADRs)'] + menu = [adrs: '-'] //tag::additionalConverters[] /** @@ -486,9 +487,9 @@ collectIncludes.with { fileFilter = "adoc" // define which files are considered. default: "ad|adoc|asciidoc" - minPrefixLength = "3" // define what minimum length the prefix. default: "3" + minPrefixLength = "0" // define what minimum length the prefix. default: "3" - maxPrefixLength = "3" // define what maximum length the prefix. default: "" + maxPrefixLength = "" // define what maximum length the prefix. default: "" separatorChar = "_" // define the allowed separators after prefix. default: "-_" diff --git a/documentation/adrs/0011-rate-limiter-with-persistently-stored-last-query-time.md b/documentation/adrs/0011-rate-limiter-with-persistently-stored-last-query-time.md index 451b826..e49cf6c 100644 --- a/documentation/adrs/0011-rate-limiter-with-persistently-stored-last-query-time.md +++ b/documentation/adrs/0011-rate-limiter-with-persistently-stored-last-query-time.md @@ -18,7 +18,6 @@ Accepted. * This is only valid if our service wasn't shutdown by our cloud provider between calls to our API. If our current server is a "fresh instance", we have to ignore the last-time-called values. -* * As we run in the cloud, we need to store the last-query-time for our external APIs in a persistent store (DB). diff --git a/documentation/arc42/chapters/09_architecture_decisions.adoc b/documentation/arc42/chapters/09_architecture_decisions.adoc index 96d18d2..ec896d8 100644 --- a/documentation/arc42/chapters/09_architecture_decisions.adoc +++ b/documentation/arc42/chapters/09_architecture_decisions.adoc @@ -6,12 +6,13 @@ :filename: /chapters/09_architecture_decisions.adoc ifndef::imagesdir[:imagesdir: ../../images] +:toclevels: 1 :toc: - - [[section-design-decisions]] == Architecture Decisions +ifndef::projectRootDir[:projectRootDir: ../../..] +include::{projectRootDir}/build/adrInclude.adoc[] diff --git a/documentation/scripts/specialCollectIncludes.gradle b/documentation/scripts/specialCollectIncludes.gradle new file mode 100644 index 0000000..77e6552 --- /dev/null +++ b/documentation/scripts/specialCollectIncludes.gradle @@ -0,0 +1,19 @@ +import static groovy.io.FileType.* + +task specialCollectIncludes ( + description: 'collects all ADR files as inlcude', + group: 'docToolchain' +) { + doLast { + println ("collect ADRs\n") + def adrFolder = new File (targetDir, "adrs") + println adrFolder.canonicalPath + def outFile = new File(targetDir,"adrInclude.adoc") + println ("write result to "+outFile.canonicalPath) + outFile.write("//autogenerated through ./dtcw specialCollectIncludes\n\n") + adrFolder.traverse(type: FILES) { file -> + print file.name+"\n" + outFile.append("include::adrs/${file.name}[leveloffset=+1]\n") + } + } +}