Skip to content

Commit

Permalink
[#3664] Put dev docs into distinct language folder
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sophokles73 committed Dec 4, 2024
1 parent bc86807 commit 301b5d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions jenkins/Hono-Website-Pipeline-Declarative.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
'''
}
}
Expand Down Expand Up @@ -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 {
Expand All @@ -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}"
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions site/documentation/config_version.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ defaultContentLanguageInSubdir = "false"
[Languages]
[Languages.dev]
title = "Eclipse Hono&trade; Vers.: dev"
contentDir = "content/dev"
weight = 0
languageName = "dev"
[Languages.dev.params]
Expand Down

0 comments on commit 301b5d1

Please sign in to comment.