diff --git a/config.toml b/config.toml index 247407777ba..9e62233c9ef 100644 --- a/config.toml +++ b/config.toml @@ -33,7 +33,22 @@ relativeURLs = true service = 'GitHub' urlPatternEdit = 'https://github.com/%s/%s/edit/%s/%s' urlPatternView = 'https://github.com/%s/%s/blob/%s/%s' - + +[params.giscus] + repo = "nerdydaytrips/website" + repoID = "R_kgDOOu4FrA" + category = "Venues" + categoryID = "DIC_kwDOOu4FrM4Crptl" + mapping = "pathname" + strict = "0" + reactionsEnabled = "0" + emitMetadata = "0" + inputPosition = "bottom" + theme = "transparent_dark" + lang = "en" + loading = "lazy" + crossorigin = "anonymous" + [frontmatter] lastmod = ["lastmod", ":git", "date", "publishDate"] diff --git a/themes/ndt2/layouts/_default/single.html b/themes/ndt2/layouts/_default/single.html index f4420448fb7..d5abaf232a5 100644 --- a/themes/ndt2/layouts/_default/single.html +++ b/themes/ndt2/layouts/_default/single.html @@ -2,8 +2,7 @@

{{ if .Params.lat }} -   - {{ end }} {{ .Title }} +   {{ end }}{{ .Title }} {{ if .Params.external_url }}   @@ -85,12 +84,14 @@

{{ if .Params.lat }} {{- end }} {{- .Content -}}

-
+
{{ if .Params.lat }} - Open in Google Maps -
- Open in OpenStreetMap -{{ end }} -{{ partial "repository-link.html" (dict "action" "edit" "page" .) }} + Google Maps  + OpenStreetMap +{{ end }}  +{{ partial "repository-link.html" (dict "action" "edit" "page" .) }}  {{ partial "repository-link.html" (dict "action" "view" "page" .) }} +

+{{ partial "giscus.html" . }} +
{{ end }} diff --git a/themes/ndt2/layouts/blog/single.html b/themes/ndt2/layouts/blog/single.html index 792d79be9f3..7c093eb8f64 100644 --- a/themes/ndt2/layouts/blog/single.html +++ b/themes/ndt2/layouts/blog/single.html @@ -65,8 +65,10 @@

{{ i18n "seeAlso" }}

{{ end }} {{ end }} -
+
{{ partial "repository-link.html" (dict "action" "edit" "page" .) }} + {{ partial "repository-link.html" (dict "action" "view" "page" .) }} +

{{ if ne .Type "page" }} @@ -83,28 +85,7 @@

{{ i18n "seeAlso" }}

{{ end }} {{ end }} -{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (and .Site.Params.comments (ne .Type "page"))) }} - {{ if .Site.DisqusShortname }} - {{ if .Site.Params.delayDisqus }} -
- -
- -
- {{ else }} -
- {{ template "_internal/disqus.html" . }} -
- {{ end }} - {{ end }} - {{ if .Site.Params.staticman }} -
- {{ partial "staticman-comments.html" . }} -
- {{ end }} -{{ end }} +
+{{ partial "giscus.html" . }} +
{{ end }} \ No newline at end of file diff --git a/themes/ndt2/layouts/partials/giscus.html b/themes/ndt2/layouts/partials/giscus.html new file mode 100644 index 00000000000..cd95ed9fb7c --- /dev/null +++ b/themes/ndt2/layouts/partials/giscus.html @@ -0,0 +1,20 @@ +{{- if isset .Site.Params "giscus" -}} + {{- if and (isset .Site.Params.giscus "repo") (not (eq .Site.Params.giscus.repo "" )) (eq (.Params.disable_comments | default false) false) -}} + + + {{- end -}} +{{- end -}} diff --git a/themes/ndt2/layouts/partials/repository-link.html b/themes/ndt2/layouts/partials/repository-link.html index e9259825ede..9a9b23c3615 100644 --- a/themes/ndt2/layouts/partials/repository-link.html +++ b/themes/ndt2/layouts/partials/repository-link.html @@ -6,15 +6,13 @@ {{- $icon := "" }} {{- if eq $.action "edit" }} {{- $href = printf .urlPatternEdit .owner .repo .branch $path | urls.JoinPath }} - {{- $text = printf "Edit this page on %s" .service }} + {{- $text = printf "Edit on %s" .service }} {{- $icon = "fa-solid fa-pen-to-square" }} {{- else if eq $.action "view" }} {{- $href = printf .urlPatternView .owner .repo .branch $path | urls.JoinPath }} - {{- $text = printf "View this page on %s" .service }} + {{- $text = printf "View on %s" .service }} {{- $icon = "fa-solid fa-eye" }} {{- end }} - +  {{ $text }} {{- end }} {{- end -}} \ No newline at end of file