Skip to content

[Backport release-1.32] Overhaul docs templating #6020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: release-1.32
Choose a base branch
from

Conversation

twz123
Copy link
Member

@twz123 twz123 commented Jun 20, 2025

@twz123 twz123 added documentation Improvements or additions to documentation area/ci backport/release-1.31 PR that needs to be backported/cherrypicked to the release-1.31 branch labels Jun 20, 2025
@twz123 twz123 force-pushed the backport-6018-to-release-1.32 branch 2 times, most recently from 97cefe5 to fd1c99d Compare June 20, 2025 13:13
twz123 added 3 commits June 20, 2025 15:46
Allows for deeper integration into the sources and build system,
obtaining values from a single source of truth. This should reduce the
number of search-and-replace actions that typically occur across the
codebase.

Introduce a custom MkDocs macro module to enable more advanced
templating in the documentation. Add the src_var and build_var macros to
make values stored as literal variables or constants in the sources or
variables declared in the build system accessible.

Add the custom ljust filter to maintain the correct table layout when
replacing values of varying lengths.

Update the Makefiles and GitHub workflows to support the custom
module. Replace the KUBERNETES_VERSION environment variable with
build_var('kubernetes_version') and forward the k0s version to
the documentation build. Use the k0s version directly instead
of constructing it from the Kubernetes version in each template
replacement. Use the new macros and filters to replace some previously
hardcoded values.

Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
(cherry picked from commit cd3f9e9)
(cherry picked from commit 87a0fb4)
mike seems to invoke mkdocs, hence it needs the PYTHONPATH with the
custom modules.

Fixes: cd3f9e9 ("Overhaul docs templating")
Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
(cherry picked from commit 702ed06)
(cherry picked from commit 96da40f)
Export PYTHONPATH and K0S_VERSION environment variables in the setup
step, so they will be available in subsequent steps.

Fixes: cd3f9e9 ("Overhaul docs templating")
Fixes: 702ed06 ("Fix docs version updates")
Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
(cherry picked from commit 01a59d1)
(cherry picked from commit 622562d)
@twz123 twz123 force-pushed the backport-6018-to-release-1.32 branch from fd1c99d to de89e98 Compare June 20, 2025 13:46
@twz123 twz123 marked this pull request as ready for review June 20, 2025 22:01
@twz123 twz123 requested review from a team as code owners June 20, 2025 22:01
@twz123 twz123 requested review from kke and jnummelin June 20, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci backport/release-1.31 PR that needs to be backported/cherrypicked to the release-1.31 branch documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant