From 34ca5b8da81a2b0449c1eef24b4d409045cdcd1b Mon Sep 17 00:00:00 2001 From: Oleksandr Dzhychko Date: Thu, 2 Nov 2023 17:20:55 +0100 Subject: [PATCH 1/7] docs: enable sourcemap for line numbers in error reporting See https://docs.antora.org/antora/latest/playbook/asciidoc-sourcemap/ --- antora-playbook-develop.yml | 1 + antora-playbook.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/antora-playbook-develop.yml b/antora-playbook-develop.yml index 7e47bcf7..23bdd8aa 100644 --- a/antora-playbook-develop.yml +++ b/antora-playbook-develop.yml @@ -70,6 +70,7 @@ antora: - require: '@antora/lunr-extension' asciidoc: + sourcemap: true attributes: page-pagination: true page-partial: true diff --git a/antora-playbook.yml b/antora-playbook.yml index 0be691e9..eb462cda 100644 --- a/antora-playbook.yml +++ b/antora-playbook.yml @@ -65,6 +65,7 @@ antora: - require: '@antora/lunr-extension' asciidoc: + sourcemap: true attributes: page-pagination: true page-partial: true From abcc759a763f073c75cfe4441f2caadd8738c248 Mon Sep 17 00:00:00 2001 From: Oleksandr Dzhychko Date: Fri, 3 Nov 2023 07:07:02 +0100 Subject: [PATCH 2/7] build: fail when generating with errors See https://docs.antora.org/antora/latest/playbook/runtime-log-failure-level/ --- antora-playbook-develop.yml | 4 +++- antora-playbook.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/antora-playbook-develop.yml b/antora-playbook-develop.yml index 23bdd8aa..e8f34cf7 100644 --- a/antora-playbook-develop.yml +++ b/antora-playbook-develop.yml @@ -75,4 +75,6 @@ asciidoc: page-pagination: true page-partial: true - +runtime: + log: + failure_level: error diff --git a/antora-playbook.yml b/antora-playbook.yml index eb462cda..82d13794 100644 --- a/antora-playbook.yml +++ b/antora-playbook.yml @@ -70,4 +70,6 @@ asciidoc: page-pagination: true page-partial: true - +runtime: + log: + failure_level: error From 101c67382263d32d6fa8dd35184d738d4e49a460 Mon Sep 17 00:00:00 2001 From: Oleksandr Dzhychko Date: Fri, 3 Nov 2023 08:01:05 +0100 Subject: [PATCH 3/7] docs: specify module in xref in build-component.adoc --- docs/modules/ROOT/pages/tutorial/build-component.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/tutorial/build-component.adoc b/docs/modules/ROOT/pages/tutorial/build-component.adoc index 09aa9d01..ef65d53e 100644 --- a/docs/modules/ROOT/pages/tutorial/build-component.adoc +++ b/docs/modules/ROOT/pages/tutorial/build-component.adoc @@ -21,7 +21,9 @@ gradlew.bat build # windows == IntelliJ Idea Wherever possible we use the latest https://www.jetbrains.com/idea/[IntelliJ IDEA] IDE to manage projects in our repositories. -Consequently, opening any repository with IntelliJ will also allow you to build and eventually xref:main/contribute.adoc[contribute]. +Consequently, opening any repository with IntelliJ will also allow you to build and eventually xref:ROOT:main/contribute.adoc[contribute]. +// This file is included in /modelix.samples/docs/local/modules/samples/partials/short-description.adoc +// Therefore, we specify the module ROOT, so that the including works correctly. == modelix Artifact Publication From 4ab243d96eb83bf64d3df86fe3b60c278d378f45 Mon Sep 17 00:00:00 2001 From: Oleksandr Dzhychko Date: Fri, 3 Nov 2023 11:56:38 +0100 Subject: [PATCH 4/7] docs: remove the version from the component The version will be determined by the playbook. --- docs/antora.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/antora.yml b/docs/antora.yml index 34fce75f..c5fd09a7 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,7 +1,5 @@ name: modelix title: Modelix Documentation -version: - (v2@({0..9}).+({0..9})): $1 nav: - modules/ROOT/partials/nav-global.adoc From a7ff2ad088388db17ece2ac1a4d9cdf128a27aff Mon Sep 17 00:00:00 2001 From: Oleksandr Dzhychko Date: Fri, 3 Nov 2023 12:29:31 +0100 Subject: [PATCH 5/7] docs: use branches for versions of documentation --- antora-playbook-develop.yml | 29 +++++++++++++++-------------- antora-playbook.yml | 29 +++++++++++++++-------------- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/antora-playbook-develop.yml b/antora-playbook-develop.yml index e8f34cf7..74638f7f 100644 --- a/antora-playbook-develop.yml +++ b/antora-playbook-develop.yml @@ -4,6 +4,7 @@ site: start_page: modelix::index.adoc content: + branches: [ HEAD, 'docs/release/*' ] sources: # @@ -11,26 +12,26 @@ content: # # - url: https://github.com/modelix/modelix.doc - url: ./ - branches: HEAD - tags: modelix-2@({0..9}).+({0..9}) + version: + 'docs/release/(*)': '$1' start_path: docs # - url: https://github.com/modelix/modelix.samples - url: ./../modelix.samples-main - branches: HEAD - tags: modelix-2@({0..9}).+({0..9}) + version: + 'docs/release/(*)': '$1' start_path: docs/global # - url: https://github.com/modelix/modelix.core - url: ./../modelix.core-main - branches: HEAD - tags: modelix-2@({0..9}).+({0..9}) + version: + 'docs/release/(*)': '$1' start_path: docs/global # - url: https://github.com/modelix/modelix.platform - url: ./../modelix.platform - branches: HEAD - tags: modelix-2@({0..9}).+({0..9}) + version: + 'docs/release/(*)': '$1' start_path: docs/global @@ -39,20 +40,20 @@ content: # # - url: https://github.com/modelix/modelix.samples # - url: ./../modelix.samples-main -# branches: HEAD -# tags: modelix-2@({0..9}).+({0..9}) +# version: +# 'docs/release/(*)': '$1' # start_path: docs/local # # # - url: https://github.com/modelix/modelix.core # - url: ./../modelix.core-main -# branches: HEAD -# tags: modelix-2@({0..9}).+({0..9}) +# version: +# 'docs/release/(*)': '$1' # start_path: docs/local # # # - url: https://github.com/modelix/modelix.platform # - url: ./../modelix.platform -# branches: HEAD -# tags: modelix-2@({0..9}).+({0..9}) +# version: +# 'docs/release/(*)': '$1' # start_path: docs/local diff --git a/antora-playbook.yml b/antora-playbook.yml index 82d13794..ac8b8a7a 100644 --- a/antora-playbook.yml +++ b/antora-playbook.yml @@ -4,6 +4,7 @@ site: start_page: modelix::index.adoc content: + branches: [ HEAD, 'docs/release/*' ] sources: # @@ -11,23 +12,23 @@ content: # These are tied to the single 'Modelix Documentation' # - url: https://github.com/modelix/modelix.doc - branches: HEAD - tags: modelix-2@({0..9}).+({0..9}) + version: + 'docs/release/(*)': '$1' start_path: docs - url: https://github.com/modelix/modelix.samples - branches: HEAD - tags: modelix-2@({0..9}).+({0..9}) + version: + 'docs/release/(*)': '$1' start_path: docs/global - url: https://github.com/modelix/modelix.core - branches: HEAD - tags: modelix-2@({0..9}).+({0..9}) + version: + 'docs/release/(*)': '$1' start_path: docs/global - url: https://github.com/modelix/modelix.platform - branches: HEAD - tags: modelix-2@({0..9}).+({0..9}) + version: + 'docs/release/(*)': '$1' start_path: docs/global @@ -36,18 +37,18 @@ content: # Provides individual per repository documentation # # - url: https://github.com/modelix/modelix.samples -# branches: HEAD -# tags: modelix-2@({0..9}).+({0..9}) +# version: +# 'docs/release/(*)': '$1' # start_path: docs/local # # - url: https://github.com/modelix/modelix.core -# branches: HEAD -# tags: modelix-2@({0..9}).+({0..9}) +# version: +# 'docs/release/(*)': '$1' # start_path: docs/local # # - url: https://github.com/modelix/modelix.platform -# branches: HEAD -# tags: modelix-2@({0..9}).+({0..9}) +# version: +# 'docs/release/(*)': '$1' # start_path: docs/local From 1c0d5f752fc42287c9f2e296f624d22aec2cb550 Mon Sep 17 00:00:00 2001 From: Oleksandr Dzhychko Date: Fri, 3 Nov 2023 13:19:24 +0100 Subject: [PATCH 6/7] docs: always link to the latest contribution page --- docs/modules/ROOT/pages/tutorial/build-component.adoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/pages/tutorial/build-component.adoc b/docs/modules/ROOT/pages/tutorial/build-component.adoc index ef65d53e..a236ec00 100644 --- a/docs/modules/ROOT/pages/tutorial/build-component.adoc +++ b/docs/modules/ROOT/pages/tutorial/build-component.adoc @@ -21,9 +21,8 @@ gradlew.bat build # windows == IntelliJ Idea Wherever possible we use the latest https://www.jetbrains.com/idea/[IntelliJ IDEA] IDE to manage projects in our repositories. -Consequently, opening any repository with IntelliJ will also allow you to build and eventually xref:ROOT:main/contribute.adoc[contribute]. -// This file is included in /modelix.samples/docs/local/modules/samples/partials/short-description.adoc -// Therefore, we specify the module ROOT, so that the including works correctly. +Consequently, opening any repository with IntelliJ will also allow you to build and eventually xref:{page-component-latest-version}@modelix:ROOT:main/contribute.adoc[contribute]. +// Explicitly link to the latest contribution page == modelix Artifact Publication From f638a88ab7ad5d58c48d3dfe4fbdb0b22ab72265 Mon Sep 17 00:00:00 2001 From: Oleksandr Dzhychko Date: Mon, 6 Nov 2023 10:59:15 +0100 Subject: [PATCH 7/7] build: use the checked-out branch as the main branch --- antora-playbook.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/antora-playbook.yml b/antora-playbook.yml index ac8b8a7a..68edb446 100644 --- a/antora-playbook.yml +++ b/antora-playbook.yml @@ -11,7 +11,13 @@ content: # GLOBAL REPOSITORIES # These are tied to the single 'Modelix Documentation' # + - url: ./ + branches: HEAD # For CI builds want to use the current branch as `main` version + version: 'main' + start_path: docs + - url: https://github.com/modelix/modelix.doc + branches: ['docs/release/*'] version: 'docs/release/(*)': '$1' start_path: docs