From 301b5d14dd50dd8b1a5eddb9ea5b6ac8511e2dc6 Mon Sep 17 00:00:00 2001 From: Kai Hudalla Date: Wed, 4 Dec 2024 17:55:54 +0100 Subject: [PATCH] [#3664] Put dev docs into distinct language folder The dev version of the documentation has not been built correctly anymore since the update to Hugo 0.123.8. This seems to have been caused by the fact that the "dev" version content has not been put into its own "content/dev" subfolder. --- .../Hono-Website-Pipeline-Declarative.groovy | 17 +++++++++++------ site/documentation/config_version.toml | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/jenkins/Hono-Website-Pipeline-Declarative.groovy b/jenkins/Hono-Website-Pipeline-Declarative.groovy index 6242570544..45542ffeaa 100644 --- a/jenkins/Hono-Website-Pipeline-Declarative.groovy +++ b/jenkins/Hono-Website-Pipeline-Declarative.groovy @@ -83,9 +83,12 @@ pipeline { sh '''#!/bin/bash echo "cloning Hono repository..." git clone --recurse-submodules https://github.com/eclipse-hono/hono.git "${WORKSPACE}/hono" - echo "copying Documentation directory from master branch..." + echo "Adding Documentation from master branch as DEV version..." + mkdir -p "${DOC_ASSEMBLY_DIR}" cp -r "${HONO_DOCUMENTATION_DIR}" "${DOC_ASSEMBLY_DIR}" - mkdir -p "${DOC_ASSEMBLY_DIR}/content_dirs" + mv "${DOC_ASSEMBLY_DIR}/content" "${DOC_ASSEMBLY_DIR}/dev" + mkdir "${DOC_ASSEMBLY_DIR}/content" + mv "${DOC_ASSEMBLY_DIR}/dev" "${DOC_ASSEMBLY_DIR}/content/" ''' } } @@ -130,11 +133,11 @@ pipeline { echo " [Languages.stable]" echo " weight = -20000" echo " languageName = \\"stable ($VERSION)\\"" - echo " contentDir = \\"content_dirs/stable\\"" + echo " contentDir = \\"content/stable\\"" echo " [Languages.stable.params]" echo " honoVersion = \\"stable\\"" } >> "${DOC_ASSEMBLY_DIR}/config_version.toml" - cp -r "${HONO_DOCUMENTATION_DIR}/content" "${DOC_ASSEMBLY_DIR}/content_dirs/stable" + cp -r "${HONO_DOCUMENTATION_DIR}/content" "${DOC_ASSEMBLY_DIR}/content/stable" } function prepare_docu_version { @@ -147,11 +150,11 @@ pipeline { echo " title = \\"Eclipse Hono™ Vers.: ${VERSION}\\"" echo " weight = ${WEIGHT}" echo " languageName = \\"${VERSION}\\"" - echo " contentDir = \\"content_dirs/${VERSION}\\"" + echo " contentDir = \\"content/${VERSION}\\"" echo " [Languages.\\"${VERSION}\\".params]" echo " honoVersion = \\"$3\\"" } >> "${DOC_ASSEMBLY_DIR}/config_version.toml" - cp -r "${HONO_DOCUMENTATION_DIR}/content" "${DOC_ASSEMBLY_DIR}/content_dirs/$3" + cp -r "${HONO_DOCUMENTATION_DIR}/content" "${DOC_ASSEMBLY_DIR}/content/$3" } cd "${HONO_DOCUMENTATION_DIR}" @@ -165,6 +168,8 @@ pipeline { fi prepare_docu_version "${MAJOR}" "${MINOR}" "${MAJOR}.${MINOR}" done < <(tail -n+3 "${DOC_ASSEMBLY_DIR}/versions_supported.csv") # skip header line and comment + echo "Documentation source content folder layout:" + tree -d --gitignore "${DOC_ASSEMBLY_DIR}/content" ''' container("hugo") { sh '''#!/bin/bash diff --git a/site/documentation/config_version.toml b/site/documentation/config_version.toml index e98e5eb7e9..44f1d5d1cb 100644 --- a/site/documentation/config_version.toml +++ b/site/documentation/config_version.toml @@ -6,6 +6,7 @@ defaultContentLanguageInSubdir = "false" [Languages] [Languages.dev] title = "Eclipse Hono™ Vers.: dev" + contentDir = "content/dev" weight = 0 languageName = "dev" [Languages.dev.params]