From aa2825a2a7143aa08cd07f36c9896f9ec3cbd63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Lemaitre?= Date: Sat, 18 Nov 2023 21:16:33 +0100 Subject: [PATCH 1/2] Integrate utteranc.es comment system --- exampleSite/config.toml | 36 ++++++++++++++++++++++++++++++++++++ layouts/posts/single.html | 11 +++++++++++ 2 files changed, 47 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a006d6f..faa21d3 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -156,6 +156,42 @@ disableHugoGeneratorInject = false # [params.commento] # url = "" + # Utteranc.es is a lightweight comments widget built on GitHub issues. + # See https://utteranc.es/ for documentation + # Uncomment this to enable Utteranc.es. + # + # [params.utterances] + # Your GitHub repository + # + # repository = "" + + # label used for GitHub issues + # + # label = "" + + # Blog Post <-> Issue mapping. This parameter is optional. Possible values are: + # - pathname + # - url + # - title + # - og:title + # - issue number + # - specific term + # + # issueTerm = "" + + # Theme used: possible values are: + # - github-light + # - github-dark + # - preferred-color-scheme + # - github-dark-orange + # - icy-dark + # - dark-blue + # - photon-dark + # - boxy-light + # - gruvbox-dark + # + # theme = "" + # Uncomment this if you want a portrait on your start page # # [params.portrait] diff --git a/layouts/posts/single.html b/layouts/posts/single.html index dfb95a3..cc65058 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -135,5 +135,16 @@
{{ end }} + {{ if .Site.Params.Utterances.Repository }} + + {{ end }} + {{ end }} From d4e86b557bf036ed19180653af80a55d51245c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Lemaitre?= Date: Sat, 18 Nov 2023 23:56:46 +0100 Subject: [PATCH 2/2] Integrate mermaid --- .../_markup/render-codeblock-mermaid.html | 4 +++ layouts/partials/javascript.html | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 layouts/_default/_markup/render-codeblock-mermaid.html diff --git a/layouts/_default/_markup/render-codeblock-mermaid.html b/layouts/_default/_markup/render-codeblock-mermaid.html new file mode 100644 index 0000000..bb7bf42 --- /dev/null +++ b/layouts/_default/_markup/render-codeblock-mermaid.html @@ -0,0 +1,4 @@ +
+  {{- .Inner | safeHTML }}
+
+{{ .Page.Store.Set "hasMermaid" true }} \ No newline at end of file diff --git a/layouts/partials/javascript.html b/layouts/partials/javascript.html index 69ccb82..3616997 100644 --- a/layouts/partials/javascript.html +++ b/layouts/partials/javascript.html @@ -9,3 +9,28 @@ {{ end }} {{ end }} +{{ if .Page.Store.Get "hasMermaid" }} + +{{ end }} \ No newline at end of file