Skip to content

Commit e217504

Browse files
committed
✨ feat(docs): add comments support to documentation
- introduce giscus comments integration for documentation pages - create a reusable partial for comments to streamline code maintenance ♻️ refactor(docs): use markdownify for descriptions - apply markdownify to descriptions for consistent text formatting
1 parent 4ad8bc5 commit e217504

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script
2+
src="https://giscus.app/client.js"
3+
data-repo="nkdAgility/azure-devops-migration-tools"
4+
data-repo-id="MDEwOlJlcG9zaXRvcnk1NjMxOTA3MA=="
5+
data-category-id="DIC_kwDOA1tcXs4Cj0cn"
6+
{{ if .Params.discussionId }}
7+
data-mapping="number" data-term="{{ .Params.discussionId }}"
8+
{{ else }}
9+
data-mapping="og:title" data-strict="1"
10+
{{ end }}
11+
data-reactions-enabled="1"
12+
data-emit-metadata="0"
13+
data-input-position="bottom"
14+
data-theme="light_protanopia"
15+
data-lang="en"
16+
data-loading="lazy"
17+
crossorigin="anonymous"
18+
async>
19+
</script>

docs/layouts/docs/list.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h5 class="card-title">
4444
{{ .Title }}
4545
</a>
4646
</h5>
47-
<p class="card-text text-muted">{{ .Description }}</p>
47+
<p class="card-text text-muted">{{ .Description | markdownify }}</p>
4848

4949
{{/* Show child pages count */}}
5050
{{ if .Pages }}
@@ -83,6 +83,8 @@ <h5 class="card-title">
8383
{{ .Content | markdownify }}
8484
</div>
8585

86+
87+
8688
{{/* Getting started section */}}
8789
{{ $gettingStarted := .Site.GetPage "/docs/get-started/getting-started/" }}
8890
{{ if $gettingStarted }}
@@ -100,6 +102,10 @@ <h4 class="alert-heading">
100102
</div>
101103
</div>
102104
{{ end }}
105+
106+
<div class="docs-comments">
107+
{{ partial "docs/comments.html" . }}
108+
</div>
103109
</div>
104110
</div>
105111
</div>

docs/layouts/docs/single.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,8 @@ <h1 class="docs-title">{{ .Title }}</h1>
6060
{{ .Content }}
6161
</div>
6262

63-
<div class="docs-commnets">
64-
<script
65-
src="https://giscus.app/client.js"
66-
data-repo="nkdAgility/azure-devops-migration-tools"
67-
data-repo-id="MDEwOlJlcG9zaXRvcnk1NjMxOTA3MA=="
68-
data-category-id="DIC_kwDOA1tcXs4Cj0cn"
69-
{{ if .Params.discussionId }}
70-
data-mapping="number" data-term="{{ .Params.discussionId }}"
71-
{{ else }}
72-
data-mapping="og:title" data-strict="1"
73-
{{ end }}
74-
data-reactions-enabled="1"
75-
data-emit-metadata="0"
76-
data-input-position="bottom"
77-
data-theme="light_protanopia"
78-
data-lang="en"
79-
data-loading="lazy"
80-
crossorigin="anonymous"
81-
async></script>
63+
<div class="docs-comments">
64+
{{ partial "docs/comments.html" . }}
8265
</div>
8366

8467
{{/* Page navigation */}}

0 commit comments

Comments
 (0)