mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 20:13:31 +08:00
Merge branch 'master' into fix-multilangual
This commit is contained in:
commit
794c3ab81d
@ -14,6 +14,10 @@ googleAnalytics:
|
|||||||
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl, it
|
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl, it
|
||||||
DefaultContentLanguage: en
|
DefaultContentLanguage: en
|
||||||
|
|
||||||
|
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
|
||||||
|
# This will make .Summary and .WordCount behave correctly for CJK languages.
|
||||||
|
hasCJKLanguage: false
|
||||||
|
|
||||||
permalinks:
|
permalinks:
|
||||||
post: /p/:slug/
|
post: /p/:slug/
|
||||||
page: /:slug/
|
page: /:slug/
|
||||||
@ -111,6 +115,17 @@ params:
|
|||||||
reactionsEnabled: 1
|
reactionsEnabled: 1
|
||||||
emitMetadata: 0
|
emitMetadata: 0
|
||||||
|
|
||||||
|
gitalk:
|
||||||
|
owner:
|
||||||
|
admin:
|
||||||
|
repo:
|
||||||
|
clientID:
|
||||||
|
clientSecret:
|
||||||
|
|
||||||
|
cusdis:
|
||||||
|
host:
|
||||||
|
id:
|
||||||
|
|
||||||
widgets:
|
widgets:
|
||||||
enabled:
|
enabled:
|
||||||
- search
|
- search
|
||||||
@ -176,6 +191,10 @@ related:
|
|||||||
weight: 200
|
weight: 200
|
||||||
|
|
||||||
markup:
|
markup:
|
||||||
|
goldmark:
|
||||||
|
renderer:
|
||||||
|
## Set to true if you have HTML content inside Markdown
|
||||||
|
unsafe: false
|
||||||
tableOfContents:
|
tableOfContents:
|
||||||
endLevel: 4
|
endLevel: 4
|
||||||
ordered: true
|
ordered: true
|
||||||
|
@ -32,3 +32,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
|
|||||||
## Vimeo Simple Shortcode
|
## Vimeo Simple Shortcode
|
||||||
|
|
||||||
{{< vimeo_simple 48912912 >}}
|
{{< vimeo_simple 48912912 >}}
|
||||||
|
|
||||||
|
## bilibilibi Shortcode
|
||||||
|
|
||||||
|
{{< bilibili av498363026 >}}
|
||||||
|
21
i18n/de.yaml
21
i18n/de.yaml
@ -17,23 +17,37 @@ list:
|
|||||||
other: Unterabschnitte
|
other: Unterabschnitte
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: Zurück
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Inhaltsverzeichnis
|
||||||
|
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: Verwandte Inhalte
|
other: Verwandte Inhalte
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: Zuletzt aktualisiert am
|
other: Zuletzt aktualisiert am
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
one: "{{ .Count }} Minute Lesezeit"
|
||||||
|
other: "{{ .Count }} Minuten Lesezeit"
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title:
|
title:
|
||||||
other: Seite nicht gefunden
|
other: Seite nicht gefunden
|
||||||
|
|
||||||
subtitle:
|
subtitle:
|
||||||
other: Diese Seite existiert nicht.
|
other: Diese Seite existiert nicht
|
||||||
|
|
||||||
widget:
|
widget:
|
||||||
archives:
|
archives:
|
||||||
title:
|
title:
|
||||||
other: Archiv
|
other: Archiv
|
||||||
|
|
||||||
more:
|
more:
|
||||||
other: Weitere
|
other: Weitere
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Schlagwörter
|
other: Schlagwörter
|
||||||
@ -41,13 +55,16 @@ widget:
|
|||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
other: Suche
|
other: Suche
|
||||||
|
|
||||||
placeholder:
|
placeholder:
|
||||||
other: Etwas tippen...
|
other: Etwas tippen...
|
||||||
|
|
||||||
resultTitle:
|
resultTitle:
|
||||||
other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)"
|
other: "#PAGES_COUNT Seiten (#TIME_SECONDS Sekunden)"
|
||||||
|
|
||||||
footer:
|
footer:
|
||||||
builtWith:
|
builtWith:
|
||||||
other: Erstellt mit {{ .Generator }}
|
other: Erstellt mit {{ .Generator }}
|
||||||
|
|
||||||
designedBy:
|
designedBy:
|
||||||
other: Theme {{ .Theme }} gestaltet von {{ .DesignedBy }}
|
other: Theme {{ .Theme }} gestaltet von {{ .DesignedBy }}
|
||||||
|
@ -30,15 +30,15 @@ article:
|
|||||||
other: Last updated on
|
other: Last updated on
|
||||||
|
|
||||||
readingTime:
|
readingTime:
|
||||||
one: "{{ .Count }} min read"
|
one: "{{ .Count }} minute read"
|
||||||
### Seems that there's no need to add 's' even if it's plural in English
|
other: "{{ .Count }} minute read"
|
||||||
other: "{{ .Count }} min read"
|
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title:
|
title:
|
||||||
other: Not Found
|
other: Not Found
|
||||||
|
|
||||||
subtitle:
|
subtitle:
|
||||||
other: This page does not exist.
|
other: This page does not exist
|
||||||
|
|
||||||
widget:
|
widget:
|
||||||
archives:
|
archives:
|
||||||
|
17
i18n/es.yaml
17
i18n/es.yaml
@ -17,14 +17,26 @@ list:
|
|||||||
other: Subsecciones
|
other: Subsecciones
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: Volver
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Tabla de contenido
|
||||||
|
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: Contenidos relacionados
|
other: Contenidos relacionados
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: Última vez actualizado
|
other: Última vez actualizado
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
one: "{{ .Count }} minuto a leer"
|
||||||
|
other: "{{ .Count }} minutos a leer"
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title:
|
title:
|
||||||
other: No Encontrado
|
other: No Encontrado
|
||||||
|
|
||||||
subtitle:
|
subtitle:
|
||||||
other: Esta página no existe
|
other: Esta página no existe
|
||||||
|
|
||||||
@ -32,8 +44,10 @@ widget:
|
|||||||
archives:
|
archives:
|
||||||
title:
|
title:
|
||||||
other: Archivo
|
other: Archivo
|
||||||
|
|
||||||
more:
|
more:
|
||||||
other: Más
|
other: Más
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Etiquetas
|
other: Etiquetas
|
||||||
@ -41,13 +55,16 @@ widget:
|
|||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
other: Búsqueda
|
other: Búsqueda
|
||||||
|
|
||||||
placeholder:
|
placeholder:
|
||||||
other: Teclea algo...
|
other: Teclea algo...
|
||||||
|
|
||||||
resultTitle:
|
resultTitle:
|
||||||
other: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)"
|
other: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)"
|
||||||
|
|
||||||
footer:
|
footer:
|
||||||
builtWith:
|
builtWith:
|
||||||
other: Creado con {{ .Generator }}
|
other: Creado con {{ .Generator }}
|
||||||
|
|
||||||
designedBy:
|
designedBy:
|
||||||
other: Tema {{ .Theme }} diseñado por {{ .DesignedBy }}
|
other: Tema {{ .Theme }} diseñado por {{ .DesignedBy }}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
{{ partial "article/components/related-contents" . }}
|
{{ partial "article/components/related-contents" . }}
|
||||||
|
|
||||||
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
{{ if not (eq .Params.comments false) }}
|
||||||
{{ partial "comments/include" . }}
|
{{ partial "comments/include" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
24
layouts/partials/comments/provider/cusdis.html
Normal file
24
layouts/partials/comments/provider/cusdis.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<div id="cusdis_thread"
|
||||||
|
{{ if .Site.Params.comments.cusdis.host }}
|
||||||
|
data-host="{{ .Site.Params.comments.cusdis.host }}"
|
||||||
|
{{ else }}
|
||||||
|
data-host="https://cusdis.com"
|
||||||
|
{{ end }}
|
||||||
|
data-app-id="{{ .Site.Params.comments.cusdis.id }}"
|
||||||
|
data-page-id="{{ .File.UniqueID }}"
|
||||||
|
data-page-url="{{ .Permalink }}"
|
||||||
|
data-page-title="{{ .Title }}"></div>
|
||||||
|
<script async defer src="https://cusdis.com/js/cusdis.es.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function setCusdisTheme(theme) {
|
||||||
|
let cusdis = document.querySelector('#cusdis_thread iframe');
|
||||||
|
if (cusdis) {
|
||||||
|
window.CUSDIS.setTheme(theme)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('onColorSchemeChange', (e) => {
|
||||||
|
setCusdisTheme(e.detail)
|
||||||
|
})
|
||||||
|
</script>
|
30
layouts/partials/comments/provider/gitalk.html
Normal file
30
layouts/partials/comments/provider/gitalk.html
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{{- with .Site.Params.comments.gitalk -}}
|
||||||
|
<div id="gitalk-container"></div>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css"
|
||||||
|
/>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/blueimp-md5@2.18.0/js/md5.min.js"></script>
|
||||||
|
<script>
|
||||||
|
const gitalk = new Gitalk({
|
||||||
|
clientID: "{{- .clientID -}}",
|
||||||
|
clientSecret: "{{- .clientSecret -}}",
|
||||||
|
repo: "{{- .repo -}}",
|
||||||
|
owner: "{{- .owner -}}",
|
||||||
|
admin: ["{{- .admin -}}"],
|
||||||
|
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||||
|
id: md5(location.pathname), // Max Location.pathname Legth:75 https://github.com/gitalk/gitalk/issues/102
|
||||||
|
});
|
||||||
|
(function () {
|
||||||
|
if (
|
||||||
|
["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1
|
||||||
|
) {
|
||||||
|
document.getElementById("gitalk-container").innerHTML =
|
||||||
|
"Gitalk comments not available by default when the website is previewed locally.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
gitalk.render("gitalk-container");
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
@ -13,7 +13,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="video-wrapper">
|
<div class="video-wrapper">
|
||||||
<iframe src="//player.bilibili.com/player.html?{{ $basicQuery | safeURL }}&{{ $videoQuery | safeURL }}"
|
<iframe src="https://player.bilibili.com/player.html?{{ $basicQuery | safeURL }}&{{ $videoQuery | safeURL }}"
|
||||||
scrolling="no"
|
scrolling="no"
|
||||||
frameborder="no"
|
frameborder="no"
|
||||||
framespacing="0"
|
framespacing="0"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{ $vid := .Get 0 }}
|
{{ $vid := .Get 0 }}
|
||||||
<div class="video-wrapper">
|
<div class="video-wrapper">
|
||||||
<iframe src="http://v.qq.com/txp/iframe/player.html?vid={{ $vid }}&auto=0"
|
<iframe src="https://v.qq.com/txp/iframe/player.html?vid={{ $vid }}&auto=0"
|
||||||
scrolling="no"
|
scrolling="no"
|
||||||
frameborder="no"
|
frameborder="no"
|
||||||
framespacing="0"
|
framespacing="0"
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
{{- $src := .Get "src" | default (.Get 0) -}}
|
||||||
<div class="video-wrapper">
|
<div class="video-wrapper">
|
||||||
<video
|
<video
|
||||||
controls
|
controls
|
||||||
|
src="{{- $src -}}"
|
||||||
{{ with .Get "poster" }}poster="{{- . -}}"{{ end }}
|
{{ with .Get "poster" }}poster="{{- . -}}"{{ end }}
|
||||||
{{ with .Get "src" }}src="{{- . -}}"{{ end }}
|
|
||||||
{{ with .Get "autoplay" }}autoplay{{ end }}
|
{{ with .Get "autoplay" }}autoplay{{ end }}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
Your browser doesn't support HTML5 video. Here is a
|
Your browser doesn't support HTML5 video. Here is a
|
||||||
<a href="{{ with .Get "src" }}{{- . -}}{{ end }}">link to the video</a> instead.
|
<a href="{{- $src -}}">link to the video</a> instead.
|
||||||
</p>
|
</p>
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,7 +6,7 @@ license = "GPL-3.0-only"
|
|||||||
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
|
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
|
||||||
description = "Card-style Hugo theme designed for bloggers"
|
description = "Card-style Hugo theme designed for bloggers"
|
||||||
homepage = "https://github.com/CaiJimmy/hugo-theme-stack"
|
homepage = "https://github.com/CaiJimmy/hugo-theme-stack"
|
||||||
demosite = "https://theme-stack.jimmycai.com"
|
demosite = "https://demo.stack.jimmycai.com"
|
||||||
|
|
||||||
tags = ["blog", "responsive", "clean", "light", "dark", "personal"]
|
tags = ["blog", "responsive", "clean", "light", "dark", "personal"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user