Compare commits

...
8 Commits
Author SHA1 Message Date
Jimmy 9e96c6e975 release: 3.31.0 2025-09-10 10:14:29 +00:00
Gleb A.andGitHub 47832083d8 refactor(comments): use includes instead of indexOf to improve readability (#1128)
* fix(disqusjs): refactor local DisqusJS loading check for improved readability

* fix(gitalk): refactor local Gitalk loading check for improved readability
2025-05-21 12:52:47 +02:00
LparksiandGitHub d9acd77015 feat(comment/waline): add support for Waline's turnstileKey (#1140)
* fix: Added support for waline's turnstileKey

* style: remove extra space in waline.html
2025-05-21 12:31:22 +02:00
Bernat Borràs CivilandGitHub 06aa627d3c fix(article): date translation on compact mode (#1149)
* Fix translation

* Revert jsconfig
2025-05-21 12:25:11 +02:00
Jimmy Cai 9e6b7b22a9 release: 3.30.0 2025-01-23 22:55:27 +01:00
JimmyandGitHub f1ab6c6aba fix(giscus): no longer use $.Language.LanguageCode for the language of Giscus (#1118)
fix(giscus): rollback https://github.com/CaiJimmy/hugo-theme-stack/pull/1075

User can still customize the language used for Giscus using `.Site.Params.comments.giscus.lang` parameter.
2025-01-23 22:54:37 +01:00
HamzaandGitHub 087989e427 chore(i18n): fix a tiny typo in the footer (#1099) 2024-12-22 14:53:10 +01:00
fsj2009yxandGitHub 0991f61d49 fix(comment/waline): cannot read property ‘insertBefore’ of null (#1103)
* fix: resolve issue with comments not displaying due to KaTeX and Waline render order

* Fix the problem that comment data couldn't be pulled successfully and raise Error "Cannot read property ‘insertBefore’ of null""
2024-12-22 12:44:13 +01:00
8 changed files with 18 additions and 12 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ search:
footer: footer:
builtWith: builtWith:
other: "مبني بستخدام {{ .Generator }}" other: "مبني باستخدام {{ .Generator }}"
designedBy: designedBy:
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}" other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"
+1 -1
View File
@@ -6,7 +6,7 @@
</h2> </h2>
<footer class="article-time"> <footer class="article-time">
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'> <time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}} {{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
</time> </time>
</footer> </footer>
</div> </div>
@@ -1,7 +1,8 @@
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}} {{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
<script> <script>
window.addEventListener("DOMContentLoaded", () => { window.addEventListener("DOMContentLoaded", () => {
renderMathInElement(document.body, { const mainArticleElement = document.querySelector(".main-article");
renderMathInElement(mainArticleElement, {
delimiters: [ delimiters: [
{ left: "$$", right: "$$", display: true }, { left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false }, { left: "$", right: "$", display: false },
@@ -10,4 +11,4 @@
], ],
ignoredClasses: ["gist"] ignoredClasses: ["gist"]
});}) });})
</script> </script>
@@ -21,8 +21,12 @@
} }
function lazyLoadDisqusJS() { function lazyLoadDisqusJS() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) { const excludedHosts = ["localhost", "127.0.0.1"];
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.'; const hostname = window.location.hostname;
if (excludedHosts.includes(hostname)) {
document.getElementById('disqus_thread').innerHTML =
'Disqus comments not available by default when the website is previewed locally.';
return; return;
} }
@@ -11,7 +11,7 @@
data-emit-metadata="{{- default 0 .emitMetadata -}}" data-emit-metadata="{{- default 0 .emitMetadata -}}"
data-input-position="{{- default `top` .inputPosition -}}" data-input-position="{{- default `top` .inputPosition -}}"
data-theme="{{- default `light` .lightTheme -}}" data-theme="{{- default `light` .lightTheme -}}"
data-lang="{{- default (default `en` $.Language.LanguageCode) .lang -}}" data-lang="{{- default `en` .lang -}}"
data-loading="{{- .loading -}}" data-loading="{{- .loading -}}"
crossorigin="anonymous" crossorigin="anonymous"
async async
@@ -18,9 +18,10 @@
proxy: {{- .proxy -}}, proxy: {{- .proxy -}},
}); });
(function () { (function () {
if ( const excludedHosts = ["localhost", "127.0.0.1"];
["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1 const hostname = window.location.hostname;
) {
if (excludedHosts.includes(hostname)) {
document.getElementById("gitalk-container").innerHTML = document.getElementById("gitalk-container").innerHTML =
"Gitalk comments not available by default when the website is previewed locally."; "Gitalk comments not available by default when the website is previewed locally.";
return; return;
@@ -16,7 +16,7 @@
{{- with .Site.Params.comments.waline -}} {{- with .Site.Params.comments.waline -}}
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}} {{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}} {{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" "turnstilekey" "turnstileKey" -}}
{{- range $key, $val := . -}} {{- range $key, $val := . -}}
{{- if ne $val nil -}} {{- if ne $val nil -}}
+1 -1
View File
@@ -1,4 +1,4 @@
{{- $ThemeVersion := "3.29.0" -}} {{- $ThemeVersion := "3.31.0" -}}
<footer class="site-footer"> <footer class="site-footer">
<section class="copyright"> <section class="copyright">
&copy; &copy;