File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
module/layouts/_partials/components/guide Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 55 < aside class ="col-md-3 " style ="top: 1rem; max-height: 100vh; " aria-label ="Table of contents navigation ">
66 < nav class ="content-list bg-light p-3 rounded h-100 d-flex flex-column " aria-label ="Guide navigation ">
77 < div class ="content-collaboration d-flex justify-content-between align-items-center mb-3 pb-2 border-bottom ">
8- < a href ="{{ .Site.Params.githubUrl }}/discussions " class ="text-decoration-none text-primary " target ="_blank "> < i class ="fa-solid fa-comments me-1 "> </ i > {{ i18n "guide_join_discussion" }} </ a >
8+ {{- $sectionPage := .Site.GetPage .Section }}
9+ {{- $discussionUrl := .Site.Params.githubUrl | default "" }}
10+ {{- if $sectionPage }}
11+ {{- if $sectionPage.Params.discussionForumUrl }}
12+ {{- $discussionUrl = $sectionPage.Params.discussionForumUrl }}
13+ {{- else }}
14+ {{- $discussionUrl = printf "%s/discussions" (.Site.Params.githubUrl | default "") }}
15+ {{- end }}
16+ {{- else }}
17+ {{- /* Fallback: use default GitHub discussions URL if section page not found */}}
18+ {{- $discussionUrl = printf "%s/discussions" (.Site.Params.githubUrl | default "") }}
19+ {{- warnf "Section page not found for section '%s', using default discussion URL" .Section }}
20+ {{- end }}
21+ < a href ="{{ $discussionUrl }} " class ="text-decoration-none text-primary " target ="_blank ">
22+ < i class ="fa-solid fa-comments me-1 "> </ i > {{ i18n "guide_join_discussion" }}
23+ </ a >
924 {{ partial "components/share-dropdown.html" . }}
1025 </ div >
1126
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ guide_overview: |
1111 [Guide 1](/guide-1/latest) is a practical, community-curated reference for best practices in knowledge work.
1212guide_logo : " guide-1-logo.png"
1313weight : 1
14+ discussionForumUrl : " https://forum.example.com/c/guide-1"
1415guide_license : |
1516 This work is licensed by Generic Publishing Corp and Anonymous Authors under a Creative Commons Attribution 4.0 International License.
1617guide_comparison :
You can’t perform that action at this time.
0 commit comments