-
+ {{ range (.Paginate ( where .Site.RegularPages "Section" "posts" ).ByDate.Reverse).Pages }}
+ {{ if ne .Kind "section" }}
+
-
+ {{ .Title }}
+
+ +
+ {{ end }}
+ {{ end }}
+
diff --git a/.vscode/ltex.dictionary.en-GB.txt b/.vscode/ltex.dictionary.en-GB.txt index 9ca3b0c..adce21c 100644 --- a/.vscode/ltex.dictionary.en-GB.txt +++ b/.vscode/ltex.dictionary.en-GB.txt @@ -1,3 +1,4 @@ MISMaP metascience Borek +giscus diff --git a/.vscode/ltex.disabledRules.en-GB.txt b/.vscode/ltex.disabledRules.en-GB.txt index 92dba8a..e2ea980 100644 --- a/.vscode/ltex.disabledRules.en-GB.txt +++ b/.vscode/ltex.disabledRules.en-GB.txt @@ -1 +1,2 @@ OXFORD_SPELLING_Z_NOT_S +MORFOLOGIK_RULE_EN_GB diff --git a/config.toml b/config.toml index 36b8e70..d02f764 100644 --- a/config.toml +++ b/config.toml @@ -13,6 +13,24 @@ theme = 'lines' logo = "" orgName = "Daniel Borek" orgLocal = "" + disableComments = false + +[params.giscus] + repo="danieltomasz/danieltomasz.github.io" + repo-id="MDEwOlJlcG9zaXRvcnkzMzM0MDUzMzY=" + category="Comments" + category-id="DIC_kwDOE99cmM4CVDXo" + mapping="title" + strict="0" + reactions-enabled="1" + emit-metadata="1" + input-position="bottom" + theme="light" + lang="en" + loading="lazy" + crossorigin="anonymous" + reactionsEnabled = "1" + [frontmatter] date = [":filename", ":default", "lastmod"] @@ -124,17 +142,3 @@ ignoreFiles = [ "\\.qmd$", "\\.ipynb$", "\\.py$" ] name = "twitter" link = "https://www.twitter.com/danieltomasz" -[params.giscus] - data-repo="danieltomasz/danieltomasz.github.io" - data-repo-id="MDEwOlJlcG9zaXRvcnkzMzM0MDUzMzY=" - data-category="Comments" - data-category-id="DIC_kwDOE99cmM4CVDXo" - data-mapping="title" - data-strict="0" - data-reactions-enabled="1" - data-emit-metadata="1" - data-input-position="top" - data-theme="light" - data-lang="en" - data-loading="lazy" - crossorigin="anonymous" \ No newline at end of file diff --git a/content/pages/about.md b/content/pages/about.md index 9116a7b..ca61a19 100644 --- a/content/pages/about.md +++ b/content/pages/about.md @@ -1,6 +1,8 @@ --- title: About +noComment: true --- +## Daniel Borek I studied physics within a MISMaP interdisciplinary programme and philosophy at University of Warsaw. diff --git a/content/posts/back to hugo.md b/content/posts/back to hugo.md index 5ea3aea..822e8d6 100644 --- a/content/posts/back to hugo.md +++ b/content/posts/back to hugo.md @@ -119,4 +119,25 @@ I try this setting within the markup section, ### Rendering mermaid diagrams -Paul Johnson describe his setup in [ this blogpost](https://www.paulrjohnson.net/2022/09/rendering-mermaid-diagrams-on-a-hugo-website-using-quarto/). \ No newline at end of file +Paul Johnson describe his setup in [ this blogpost](https://www.paulrjohnson.net/2022/09/rendering-mermaid-diagrams-on-a-hugo-website-using-quarto/). + + +### Adding comments with `giscus` + +I followed various blogpost with the configuration advices. +By default, `giscus` is adding comments to every page, but I wanted to have comments only on my posts. +I followed advice[^1] and I wrapped my addition of `giscus` partial into `footer.html` with `if` statement: + +```hugo +{{ if not .Params.noComment }} + {{ partial "giscus" . }} +{{ end }} +``` + +When I don't want to include a comments block, I am adding this in the frontmatter of the post (yaml): + +```yaml +noComment: true +``` + +[^1]: [How to disable comments in specific pages? - support - HUGO](https://discourse.gohugo.io/t/how-to-disable-comments-in-specific-pages/22177/2) \ No newline at end of file diff --git a/content/posts/learning-hugo.md b/content/posts/learning-hugo.md new file mode 100644 index 0000000..486627e --- /dev/null +++ b/content/posts/learning-hugo.md @@ -0,0 +1,11 @@ +--- +title: "Learning Hugo" +date: "2023-08-03" +draft: true +tags: +- Quatro +- Hugo +--- + +Customization of the site +[Context And Variables In The Hugo Static Site Generator — Smashing Magazine](https://www.smashingmagazine.com/2021/02/context-variables-hugo-static-site-generator/) \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..e054d30 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,25 @@ + + + {{ partial "head.html" . }} +
+