mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
Merge branch 'CaiJimmy:master' into master
This commit is contained in:
commit
bc88d10a3c
10
config.yaml
10
config.yaml
@ -51,6 +51,12 @@ params:
|
|||||||
issueTerm: pathname
|
issueTerm: pathname
|
||||||
label:
|
label:
|
||||||
|
|
||||||
|
beaudar:
|
||||||
|
repo:
|
||||||
|
issueTerm: pathname
|
||||||
|
label:
|
||||||
|
theme:
|
||||||
|
|
||||||
remark42:
|
remark42:
|
||||||
host:
|
host:
|
||||||
site:
|
site:
|
||||||
@ -64,7 +70,7 @@ params:
|
|||||||
clientSecret:
|
clientSecret:
|
||||||
autoCreateIssue: false
|
autoCreateIssue: false
|
||||||
|
|
||||||
# Waline client configuration see: https://waline.js.org/en/reference/client.html
|
# Waline client configuration see: https://waline.js.org/en/reference/client/props.html
|
||||||
waline:
|
waline:
|
||||||
serverURL:
|
serverURL:
|
||||||
lang:
|
lang:
|
||||||
@ -75,9 +81,9 @@ params:
|
|||||||
requiredMeta:
|
requiredMeta:
|
||||||
- nick
|
- nick
|
||||||
- mail
|
- mail
|
||||||
placeholder:
|
|
||||||
locale:
|
locale:
|
||||||
admin: Admin
|
admin: Admin
|
||||||
|
placeholder:
|
||||||
|
|
||||||
twikoo:
|
twikoo:
|
||||||
envId:
|
envId:
|
||||||
|
@ -1,10 +1,18 @@
|
|||||||
baseurl: https://example.com
|
baseurl: https://example.com
|
||||||
languageCode: en-us
|
languageCode: en-us
|
||||||
theme: hugo-theme-stack
|
theme: hugo-theme-stack
|
||||||
paginate: 5
|
paginate: 3
|
||||||
title: Example Site
|
title: Example Site
|
||||||
copyright: Example Person
|
copyright: Example Person
|
||||||
|
|
||||||
|
# Theme i18n support
|
||||||
|
# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
|
||||||
|
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
|
||||||
|
|
||||||
languages:
|
languages:
|
||||||
en:
|
en:
|
||||||
languageName: English
|
languageName: English
|
||||||
@ -26,19 +34,13 @@ languages:
|
|||||||
params:
|
params:
|
||||||
description: وصف تجريبي
|
description: وصف تجريبي
|
||||||
|
|
||||||
# Change it to your Disqus shortname before using
|
services:
|
||||||
disqusShortname: hugo-theme-stack
|
# Change it to your Disqus shortname before using
|
||||||
|
disqus:
|
||||||
# GA Tracking ID
|
shortname: "hugo-theme-stack"
|
||||||
googleAnalytics:
|
# GA Tracking ID
|
||||||
|
googleAnalytics:
|
||||||
# Theme i18n support
|
id:
|
||||||
# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
|
|
||||||
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/
|
||||||
@ -49,7 +51,7 @@ params:
|
|||||||
- post
|
- post
|
||||||
featuredImageField: image
|
featuredImageField: image
|
||||||
rssFullContent: true
|
rssFullContent: true
|
||||||
favicon: # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary)
|
favicon: # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary)
|
||||||
|
|
||||||
footer:
|
footer:
|
||||||
since: 2020
|
since: 2020
|
||||||
@ -91,6 +93,12 @@ params:
|
|||||||
issueTerm: pathname
|
issueTerm: pathname
|
||||||
label:
|
label:
|
||||||
|
|
||||||
|
beaudar:
|
||||||
|
repo:
|
||||||
|
issueTerm: pathname
|
||||||
|
label:
|
||||||
|
theme:
|
||||||
|
|
||||||
remark42:
|
remark42:
|
||||||
host:
|
host:
|
||||||
site:
|
site:
|
||||||
|
72
i18n/be.yaml
Normal file
72
i18n/be.yaml
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Паказаць/схаваць меню
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Цёмны рэжым
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} старонка"
|
||||||
|
few: "{{ .Count }} старонкі"
|
||||||
|
many: "{{ .Count }} старонак"
|
||||||
|
other: "{{ .Count }} старонкі"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Раздзел
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Падраздзел
|
||||||
|
few: Падраздзелы
|
||||||
|
many: Падраздзелы
|
||||||
|
other: Падраздзелы
|
||||||
|
|
||||||
|
article:
|
||||||
|
back:
|
||||||
|
other: Назад
|
||||||
|
|
||||||
|
relatedContent:
|
||||||
|
other: Таксама рэкамендуем
|
||||||
|
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Абноўлена
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Змест
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
other: "Час чытання: {{ .Count }} хв."
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Не знойдзена
|
||||||
|
|
||||||
|
subtitle:
|
||||||
|
other: Запытваемая старонка не існуе
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Архівы
|
||||||
|
more:
|
||||||
|
other: Яшчэ
|
||||||
|
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Тэгі
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Пошук
|
||||||
|
|
||||||
|
placeholder:
|
||||||
|
other: Увядзіце нешта...
|
||||||
|
|
||||||
|
resultTitle:
|
||||||
|
other: "Знайдзена #PAGES_COUNT старонак (за #TIME_SECONDS с.)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Створана пры дапамозе {{ .Generator }}
|
||||||
|
|
||||||
|
designedBy:
|
||||||
|
other: Тэма {{ .Theme }}, дызайн {{ .DesignedBy }}
|
71
i18n/sk.yaml
Normal file
71
i18n/sk.yaml
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Skryť menu
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Tmavý režim
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} stránka"
|
||||||
|
other: "{{ .Count }} stránok"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Kategórie
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Podkategória
|
||||||
|
other: Podkategórie
|
||||||
|
|
||||||
|
article:
|
||||||
|
back:
|
||||||
|
other: Späť
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Obsah
|
||||||
|
|
||||||
|
relatedContent:
|
||||||
|
other: Súvisiace
|
||||||
|
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Naposledy aktualizované
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
one: "{{ .Count }} minúta"
|
||||||
|
other: "{{ .Count }} minút"
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Nenájdené
|
||||||
|
|
||||||
|
subtitle:
|
||||||
|
other: Tato stránka neexistuje
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Archívy
|
||||||
|
more:
|
||||||
|
other: Viac
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Štítky
|
||||||
|
categoriesCloud:
|
||||||
|
title:
|
||||||
|
other: Kategórie
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Hladať
|
||||||
|
|
||||||
|
placeholder:
|
||||||
|
other: Zadajte niečo...
|
||||||
|
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT stránok (#TIME_SECONDS sekúnd)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Vytvorené pomocou {{ .Generator }}
|
||||||
|
|
||||||
|
designedBy:
|
||||||
|
other: Šablóna {{ .Theme }} od {{ .DesignedBy }}
|
46
layouts/partials/comments/provider/beaudar.html
Normal file
46
layouts/partials/comments/provider/beaudar.html
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<script
|
||||||
|
src="https://beaudar.lipk.org/client.js"
|
||||||
|
repo="{{ .Site.Params.comments.beaudar.repo }}"
|
||||||
|
issue-term="{{ .Site.Params.comments.beaudar.issueTerm }}"
|
||||||
|
{{ with .Site.Params.comments.beaudar.label }}
|
||||||
|
label="{{ . }}"
|
||||||
|
{{ end }}
|
||||||
|
theme="{{ .Site.Params.comments.beaudar.theme }}"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
async
|
||||||
|
></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.beaudar {
|
||||||
|
max-width: unset;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let beaudarLoaded = false;
|
||||||
|
|
||||||
|
function setBeaudarTheme(theme) {
|
||||||
|
let beaudar = document.querySelector(".beaudar iframe");
|
||||||
|
if (beaudar) {
|
||||||
|
beaudar.contentWindow.postMessage(
|
||||||
|
{
|
||||||
|
type: "set-theme",
|
||||||
|
theme: `github-${theme}`,
|
||||||
|
},
|
||||||
|
"https://beaudar.lipk.org"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
addEventListener("message", (event) => {
|
||||||
|
if (event.origin !== "https://beaudar.lipk.org") return;
|
||||||
|
/// Called when Beaudar is ready
|
||||||
|
beaudarLoaded = true;
|
||||||
|
setBeaudarTheme(document.documentElement.dataset.scheme);
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener("onColorSchemeChange", (e) => {
|
||||||
|
if (!beaudarLoaded) return;
|
||||||
|
setBeaudarTheme(e.detail);
|
||||||
|
});
|
||||||
|
</script>
|
@ -1,4 +1,4 @@
|
|||||||
{{- $ThemeVersion := "3.21.0" -}}
|
{{- $ThemeVersion := "3.23.0" -}}
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<section class="copyright">
|
<section class="copyright">
|
||||||
©
|
©
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<meta name='description' content='{{ $description }}'>
|
<meta name='description' content='{{ $description }}'>
|
||||||
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
|
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
|
||||||
|
|
||||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
{{- $title := partial "data/title" . -}}
|
||||||
<title>{{ $title }}</title>
|
<title>{{ $title }}</title>
|
||||||
|
|
||||||
<link rel='canonical' href='{{ .Permalink }}'>
|
<link rel='canonical' href='{{ .Permalink }}'>
|
||||||
|
@ -74,18 +74,21 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</ol>
|
||||||
<div class="menu-bottom-section">
|
<div class="menu-bottom-section">
|
||||||
|
<ol class="menu">
|
||||||
{{- $currentLanguageCode := .Language.Lang -}}
|
{{- $currentLanguageCode := .Language.Lang -}}
|
||||||
{{ with .Site.Home.AllTranslations }}
|
{{ if ( compare.Gt .Site.Home.AllTranslations.Len 1 ) }}
|
||||||
<li id="i18n-switch">
|
{{ with .Site.Home.AllTranslations }}
|
||||||
{{ partial "helper/icon" "language" }}
|
<li id="i18n-switch">
|
||||||
<select name="language" onchange="window.location.href = this.selectedOptions[0].value">
|
{{ partial "helper/icon" "language" }}
|
||||||
{{ range . }}
|
<select name="language" title="language" onchange="window.location.href = this.selectedOptions[0].value">
|
||||||
<option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
|
{{ range . }}
|
||||||
{{ end }}
|
<option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
|
||||||
</select>
|
{{ end }}
|
||||||
</li>
|
</select>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if (default false .Site.Params.colorScheme.toggle) }}
|
{{ if (default false .Site.Params.colorScheme.toggle) }}
|
||||||
@ -95,6 +98,6 @@
|
|||||||
<span>{{ T "darkMode" }}</span>
|
<span>{{ T "darkMode" }}</span>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</ol>
|
||||||
</ol>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
@ -4,7 +4,10 @@
|
|||||||
<aside class="sidebar right-sidebar sticky">
|
<aside class="sidebar right-sidebar sticky">
|
||||||
{{ range $widget := . }}
|
{{ range $widget := . }}
|
||||||
{{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
|
{{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
|
||||||
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" .params) }}
|
<!-- Ensure that the `params` is not nil -->
|
||||||
|
{{- $params := default dict .params -}}
|
||||||
|
|
||||||
|
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" $params) }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ warnf "Widget %s not found" .type }}
|
{{ warnf "Widget %s not found" .type }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user