You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by sn...@apache.org on 2026/05/02 19:00:03 UTC

(polaris) branch main updated: Site: resolve config includes from the current release tree (#4346)

This is an automated email from the ASF dual-hosted git repository.

snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 519a3338fd Site: resolve config includes from the current release tree (#4346)
519a3338fd is described below

commit 519a3338fde8d73782ded71177e15ca380ab104a
Author: Robert Stupp <sn...@snazy.de>
AuthorDate: Sat May 2 20:59:58 2026 +0200

    Site: resolve config includes from the current release tree (#4346)
    
    Released documentation needs to render released content.
    If a release page pulls configuration fragments from /in-dev/unreleased/, the release URL still changes with main and is no longer a reliable snapshot.
    
    This change resolves config-section-includes from the matching release tree whenever a release version is known.
    Only the developer docs keep using the unreleased source tree.
---
 site/layouts/shortcodes/include-config-section.html | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/site/layouts/shortcodes/include-config-section.html b/site/layouts/shortcodes/include-config-section.html
index b852596bf4..e10be0ede9 100644
--- a/site/layouts/shortcodes/include-config-section.html
+++ b/site/layouts/shortcodes/include-config-section.html
@@ -17,10 +17,14 @@ specific language governing permissions and limitations
 under the License.
 */}}
 {{- $sectionName := .Get 0 -}}
-{{- $pagePath := printf "/in-dev/unreleased/configuration/config-sections/%s" $sectionName -}}
+{{- $pagePath := "" -}}
+{{- with .Page.Params.release_version -}}
+  {{- $pagePath = printf "/releases/%s/configuration/config-sections/%s" . $sectionName -}}
+{{- else -}}
+  {{- $pagePath = printf "/in-dev/unreleased/configuration/config-sections/%s" $sectionName -}}
+{{- end -}}
 {{- with site.GetPage $pagePath -}}
   {{- .RawContent | $.Page.RenderString -}}
 {{- else -}}
   {{- errorf "include-config-section: page not found: %s" $pagePath -}}
 {{- end -}}
-