summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco <tomaselli.fr@gmail.com>2024-05-11 22:14:41 +0200
committerFrancesco <tomaselli.fr@gmail.com>2024-05-11 22:14:41 +0200
commit43de5d69b894aec43f993743b2d03f4157952e15 (patch)
tree930c50df484789e4a60a2a565dccc37cebc1000a
parent1ee175c6bea9bdc15188ad475565149487cb27f2 (diff)
parentedd49a893c5f581a2f622f2b29a289760bbc2edc (diff)
Merge branch 'main' into tmp
-rw-r--r--README.md19
-rw-r--r--layouts/404.html1
-rw-r--r--layouts/_default/baseof.html44
-rw-r--r--layouts/_default/home.html3
-rw-r--r--layouts/partials/comments.html2
-rw-r--r--layouts/partials/head.html10
-rw-r--r--layouts/partials/head/js.html3
-rw-r--r--layouts/partials/math.html9
-rw-r--r--layouts/partials/post-entry.html7
9 files changed, 56 insertions, 42 deletions
diff --git a/README.md b/README.md
index 529116b..4f55921 100644
--- a/README.md
+++ b/README.md
@@ -104,7 +104,8 @@ The fonts in use are [Literata](https://fonts.google.com/specimen/Literata) and
Various miscellaneous features:
- Latex blocks overflows on mobile to prevent having strange alignments;
-- Code blocks are displayed with ligatures.
+- Code blocks are displayed with ligatures;
+- [Giscus](https://giscus.app/) comments support.
### 2.6 Extending the theme
@@ -193,15 +194,15 @@ url = "/posts"
name = "resume"
url = "/resume"
-# giscus conf, for more detail, see https://giscus.app/
+# Giscus conf, for more detail, see https://giscus.app/
[params.giscus]
- enable = true
- repo = ""
- repoid = ""
- category = ""
- categoryid = ""
- mapping = "pathname"
- theme = "light"
+enable = true
+repo = ""
+repoid = ""
+category = ""
+categoryid = ""
+mapping = "pathname"
+theme = "light"
# Syntax highlight on code blocks, all styles:
# https://xyproto.github.io/splash/docs/all.html
diff --git a/layouts/404.html b/layouts/404.html
index 72ef81e..15c8a62 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -9,5 +9,4 @@
</div>
-
{{ end }} \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index a116c36..9b63b69 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -2,36 +2,35 @@
<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}"
dir="{{ or site.Language.LanguageDirection `ltr` }}">
-<head>
- {{ partial "head.html" . }}
-</head>
+ <head>
+ {{ partial "head.html" . }}
+ </head>
-{{ $theme := "auto"}}
+ {{ $theme := "auto"}}
-{{ with .Param "theme" }}
-{{ $theme = .}}
-{{ end }}
+ {{ with .Param "theme" }}
+ {{ $theme = .}}
+ {{ end }}
-<body class="{{ $theme }}">
+ <body class="{{ $theme }}">
- <div class="content">
- <header>
- {{ partial "header.html" . }}
- </header>
+ <div class="content">
+ <header>
+ {{ partial "header.html" . }}
+ </header>
- <main class="main">
- {{ block "main" . }}{{ end }}
- </main>
- </div>
+ <main class="main">
+ {{ block "main" . }}{{ end }}
+ </main>
+ </div>
- <footer>
- {{ partial "footer.html" . }}
- </footer>
+ <footer>
+ {{ partial "footer.html" . }}
+ </footer>
-</body>
+ </body>
-
-<script>
+ <script>
function isAuto() {
return document.body.classList.contains("auto");
@@ -70,5 +69,4 @@
</script>
-
</html> \ No newline at end of file
diff --git a/layouts/_default/home.html b/layouts/_default/home.html
index e251ce3..5273fa0 100644
--- a/layouts/_default/home.html
+++ b/layouts/_default/home.html
@@ -21,7 +21,8 @@
{{ with site.Params.social }}
<div class="social-icons">
{{- range . }}
- <a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me"
+ <a href="{{ trim .url " " | safeURL }}" target="_blank"
+ rel="noopener noreferrer me"
title="{{ (.title | default .name) | title }}">
{{ partial "svg.html" . }}
</a>
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index 979b59e..cbc7d6c 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -14,5 +14,5 @@
data-loading="lazy"
crossorigin="anonymous"
async>
-</script>
+ </script>
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index fef47c4..9350ee6 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,6 +1,14 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
-<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
+
+<title>
+ {{ if .IsHome }}
+ {{ site.Title }}
+ {{ else }}
+ {{ printf "%s | %s" .Title site.Title }}
+ {{ end }}
+</title>
+
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}
diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html
index 8bae509..aa471f4 100644
--- a/layouts/partials/head/js.html
+++ b/layouts/partials/head/js.html
@@ -1,6 +1,7 @@
{{- with resources.Get "js/main.js" }}
{{- $opts := dict "minify" true }}
{{- with . | js.Build $opts | fingerprint }}
-<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
+<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}"
+ crossorigin="anonymous"></script>
{{- end }}
{{- end }} \ No newline at end of file
diff --git a/layouts/partials/math.html b/layouts/partials/math.html
index c54c8d5..62b330f 100644
--- a/layouts/partials/math.html
+++ b/layouts/partials/math.html
@@ -1,7 +1,10 @@
-<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css">
-<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js"></script>
+<link rel="stylesheet"
+ href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css">
+<script defer
+ src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js"></script>
-<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js"
+<script defer
+ src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js"
onload="renderMathInElement(document.body);"></script>
<script>
diff --git a/layouts/partials/post-entry.html b/layouts/partials/post-entry.html
index 5c89bca..2439632 100644
--- a/layouts/partials/post-entry.html
+++ b/layouts/partials/post-entry.html
@@ -5,11 +5,14 @@
{{ $dateFormat = .}}
{{ end }}
-
<p class="line-date">{{ .Date.Format $dateFormat }} </p>
<div>
- <p class="line-title"> <a href="{{ .RelPermalink }}">{{ .Title }}</a></p>
+ <p class="line-title">
+ <a href="{{ .RelPermalink }}">
+ {{ .Title }}
+ </a>
+ </p>
{{ if .Site.Params.listSummaries }}
<p class="line-summary"> {{ .Summary }} </p>