mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 20:13:31 +08:00
Compare commits
No commits in common. "master" and "v3.24.0" have entirely different histories.
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -4,7 +4,7 @@ body:
|
|||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/guide/).
|
Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/).
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: what-happened
|
id: what-happened
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -131,7 +131,6 @@
|
|||||||
.article-tags {
|
.article-tags {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--accent-color-text);
|
color: var(--accent-color-text);
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.article-tags {
|
.article-tags {
|
||||||
|
flex-wrap: wrap;
|
||||||
text-transform: unset;
|
text-transform: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,28 +222,6 @@
|
|||||||
margin-inline-start: calc((var(--card-padding)) * -1);
|
margin-inline-start: calc((var(--card-padding)) * -1);
|
||||||
padding-inline-start: calc(var(--card-padding) - var(--heading-border-size));
|
padding-inline-start: calc(var(--card-padding) - var(--heading-border-size));
|
||||||
border-inline-start: var(--heading-border-size) solid var(--accent-color);
|
border-inline-start: var(--heading-border-size) solid var(--accent-color);
|
||||||
position: relative;
|
|
||||||
|
|
||||||
a.header-anchor {
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
opacity: 0;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
width: var(--card-padding);
|
|
||||||
text-align: center;
|
|
||||||
color: var(--accent-color);
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
content: "#";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
a.header-anchor {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
|
@ -212,7 +212,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-social {
|
.social-menu {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -8,10 +8,6 @@ class StackColorScheme {
|
|||||||
constructor(toggleEl: HTMLElement) {
|
constructor(toggleEl: HTMLElement) {
|
||||||
this.bindMatchMedia();
|
this.bindMatchMedia();
|
||||||
this.currentScheme = this.getSavedScheme();
|
this.currentScheme = this.getSavedScheme();
|
||||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches === true)
|
|
||||||
this.systemPreferScheme = 'dark'
|
|
||||||
else
|
|
||||||
this.systemPreferScheme = 'light';
|
|
||||||
|
|
||||||
this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);
|
this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);
|
||||||
|
|
||||||
|
@ -53,14 +53,7 @@ class Search {
|
|||||||
this.resultTitle = resultTitle;
|
this.resultTitle = resultTitle;
|
||||||
this.resultTitleTemplate = resultTitleTemplate;
|
this.resultTitleTemplate = resultTitleTemplate;
|
||||||
|
|
||||||
/// Check if there's already value in the search input
|
|
||||||
if (this.input.value.trim() !== '') {
|
|
||||||
this.doSearch(this.input.value.split(' '));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.handleQueryString();
|
this.handleQueryString();
|
||||||
}
|
|
||||||
|
|
||||||
this.bindQueryStringChange();
|
this.bindQueryStringChange();
|
||||||
this.bindSearchForm();
|
this.bindSearchForm();
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@ params:
|
|||||||
src: img/avatar.png
|
src: img/avatar.png
|
||||||
|
|
||||||
article:
|
article:
|
||||||
headingAnchor: false
|
|
||||||
math: false
|
math: false
|
||||||
toc: true
|
toc: true
|
||||||
readingTime: true
|
readingTime: true
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
baseurl: https://example.com/
|
baseurl: https://example.com
|
||||||
languageCode: en-us
|
languageCode: en-us
|
||||||
theme: hugo-theme-stack
|
theme: hugo-theme-stack
|
||||||
|
paginate: 3
|
||||||
title: Example Site
|
title: Example Site
|
||||||
copyright: Example Person
|
copyright: Example Person
|
||||||
|
|
||||||
@ -18,23 +19,20 @@ languages:
|
|||||||
title: Example Site
|
title: Example Site
|
||||||
weight: 1
|
weight: 1
|
||||||
params:
|
params:
|
||||||
sidebar:
|
description: Example description
|
||||||
subtitle: Example description
|
|
||||||
zh-cn:
|
zh-cn:
|
||||||
languageName: 中文
|
languageName: 中文
|
||||||
title: 演示站点
|
title: 演示站点
|
||||||
weight: 2
|
weight: 2
|
||||||
params:
|
params:
|
||||||
sidebar:
|
description: 演示说明
|
||||||
subtitle: 演示说明
|
|
||||||
ar:
|
ar:
|
||||||
languageName: عربي
|
languageName: عربي
|
||||||
languagedirection: rtl
|
languagedirection: rtl
|
||||||
title: موقع تجريبي
|
title: موقع تجريبي
|
||||||
weight: 3
|
weight: 3
|
||||||
params:
|
params:
|
||||||
sidebar:
|
description: وصف تجريبي
|
||||||
subtitle: وصف تجريبي
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# Change it to your Disqus shortname before using
|
# Change it to your Disqus shortname before using
|
||||||
@ -44,9 +42,6 @@ services:
|
|||||||
googleAnalytics:
|
googleAnalytics:
|
||||||
id:
|
id:
|
||||||
|
|
||||||
pagination:
|
|
||||||
pagerSize: 3
|
|
||||||
|
|
||||||
permalinks:
|
permalinks:
|
||||||
post: /p/:slug/
|
post: /p/:slug/
|
||||||
page: /:slug/
|
page: /:slug/
|
||||||
@ -161,7 +156,6 @@ params:
|
|||||||
repo:
|
repo:
|
||||||
clientID:
|
clientID:
|
||||||
clientSecret:
|
clientSecret:
|
||||||
proxy:
|
|
||||||
|
|
||||||
cusdis:
|
cusdis:
|
||||||
host:
|
host:
|
||||||
@ -209,7 +203,7 @@ params:
|
|||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
### Custom menu
|
### Custom menu
|
||||||
### See https://stack.jimmycai.com/config/menu
|
### See https://docs.stack.jimmycai.com/configuration/custom-menu.html
|
||||||
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
|
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
|
||||||
menu:
|
menu:
|
||||||
main: []
|
main: []
|
||||||
@ -240,18 +234,6 @@ related:
|
|||||||
|
|
||||||
markup:
|
markup:
|
||||||
goldmark:
|
goldmark:
|
||||||
extensions:
|
|
||||||
passthrough:
|
|
||||||
enable: true
|
|
||||||
delimiters:
|
|
||||||
block:
|
|
||||||
- - \[
|
|
||||||
- \]
|
|
||||||
- - $$
|
|
||||||
- $$
|
|
||||||
inline:
|
|
||||||
- - \(
|
|
||||||
- \)
|
|
||||||
renderer:
|
renderer:
|
||||||
## Set to true if you have HTML content inside Markdown
|
## Set to true if you have HTML content inside Markdown
|
||||||
unsafe: true
|
unsafe: true
|
@ -68,7 +68,7 @@ search:
|
|||||||
|
|
||||||
footer:
|
footer:
|
||||||
builtWith:
|
builtWith:
|
||||||
other: "مبني باستخدام {{ .Generator }}"
|
other: "مبني بستخدام {{ .Generator }}"
|
||||||
|
|
||||||
designedBy:
|
designedBy:
|
||||||
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"
|
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"
|
||||||
|
73
i18n/bg.yaml
73
i18n/bg.yaml
@ -1,73 +0,0 @@
|
|||||||
toggleMenu:
|
|
||||||
other: Покажи Меню
|
|
||||||
|
|
||||||
darkMode:
|
|
||||||
other: Тъмен Режим
|
|
||||||
|
|
||||||
list:
|
|
||||||
page:
|
|
||||||
one: "{{ .Count }} страница"
|
|
||||||
other: "{{ .Count }} страници"
|
|
||||||
|
|
||||||
section:
|
|
||||||
other: Секция
|
|
||||||
|
|
||||||
subsection:
|
|
||||||
one: Подсекция
|
|
||||||
other: Подсекции
|
|
||||||
|
|
||||||
article:
|
|
||||||
back:
|
|
||||||
other: Назад
|
|
||||||
|
|
||||||
tableOfContents:
|
|
||||||
other: Съдържание
|
|
||||||
|
|
||||||
relatedContent:
|
|
||||||
other: Свързано Съдържание
|
|
||||||
|
|
||||||
lastUpdatedOn:
|
|
||||||
other: Последна промяна на
|
|
||||||
|
|
||||||
readingTime:
|
|
||||||
one: "{{ .Count }} minute read"
|
|
||||||
other: "{{ .Count }} minute read"
|
|
||||||
|
|
||||||
notFound:
|
|
||||||
title:
|
|
||||||
other: Не е намерено
|
|
||||||
|
|
||||||
subtitle:
|
|
||||||
other: Страницата която търсите не е открита
|
|
||||||
|
|
||||||
widget:
|
|
||||||
archives:
|
|
||||||
title:
|
|
||||||
other: Архиви
|
|
||||||
|
|
||||||
more:
|
|
||||||
other: Повече
|
|
||||||
|
|
||||||
tagCloud:
|
|
||||||
title:
|
|
||||||
other: Тагове
|
|
||||||
categoriesCloud:
|
|
||||||
title:
|
|
||||||
other: Категории
|
|
||||||
|
|
||||||
search:
|
|
||||||
title:
|
|
||||||
other: Търсене
|
|
||||||
|
|
||||||
placeholder:
|
|
||||||
other: Напишете нещо...
|
|
||||||
|
|
||||||
resultTitle:
|
|
||||||
other: "#PAGES_COUNT страници (#TIME_SECONDS секунди)"
|
|
||||||
|
|
||||||
footer:
|
|
||||||
builtWith:
|
|
||||||
other: Създадено с {{ .Generator }}
|
|
||||||
|
|
||||||
designedBy:
|
|
||||||
other: Тема {{ .Theme }} създадена от {{ .DesignedBy }}
|
|
@ -50,9 +50,6 @@ widget:
|
|||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Mots clés
|
other: Mots clés
|
||||||
categoriesCloud:
|
|
||||||
title:
|
|
||||||
other: Catégories
|
|
||||||
|
|
||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
|
12
i18n/ja.yaml
12
i18n/ja.yaml
@ -4,16 +4,6 @@ toggleMenu:
|
|||||||
darkMode:
|
darkMode:
|
||||||
other: ダークモード
|
other: ダークモード
|
||||||
|
|
||||||
list:
|
|
||||||
page:
|
|
||||||
other: "{{ .Count }} ページ目"
|
|
||||||
|
|
||||||
section:
|
|
||||||
other: セクション
|
|
||||||
|
|
||||||
subsection:
|
|
||||||
other: サブセクション
|
|
||||||
|
|
||||||
article:
|
article:
|
||||||
back:
|
back:
|
||||||
other: 前のページ
|
other: 前のページ
|
||||||
@ -64,7 +54,7 @@ search:
|
|||||||
|
|
||||||
footer:
|
footer:
|
||||||
builtWith:
|
builtWith:
|
||||||
other: "{{ .Generator }} で構築されています。"
|
other: Built with {{ .Generator }}
|
||||||
|
|
||||||
designedBy:
|
designedBy:
|
||||||
other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。
|
other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。
|
||||||
|
72
i18n/oc.yaml
72
i18n/oc.yaml
@ -1,72 +0,0 @@
|
|||||||
toggleMenu:
|
|
||||||
other: Alternar menú
|
|
||||||
|
|
||||||
darkMode:
|
|
||||||
other: Mòde fosc
|
|
||||||
|
|
||||||
list:
|
|
||||||
page:
|
|
||||||
one: "{{ .Count }} pagina"
|
|
||||||
other: "{{ .Count }} paginas"
|
|
||||||
|
|
||||||
section:
|
|
||||||
other: Seccion
|
|
||||||
|
|
||||||
subsection:
|
|
||||||
one: Josseccion
|
|
||||||
other: Josseccions
|
|
||||||
|
|
||||||
article:
|
|
||||||
back:
|
|
||||||
other: Tornar
|
|
||||||
|
|
||||||
tableOfContents:
|
|
||||||
other: Taula de contengut
|
|
||||||
|
|
||||||
relatedContent:
|
|
||||||
other: Contenguts relacionats
|
|
||||||
|
|
||||||
lastUpdatedOn:
|
|
||||||
other: Darrièra actualizacion
|
|
||||||
readingTime:
|
|
||||||
one: "{{ .Count }} minuta de lectura"
|
|
||||||
other: "{{ .Count }} minutas de lectura"
|
|
||||||
|
|
||||||
notFound:
|
|
||||||
title:
|
|
||||||
other: Non trobat
|
|
||||||
|
|
||||||
subtitle:
|
|
||||||
other: Aquesta pagina existís pas
|
|
||||||
|
|
||||||
widget:
|
|
||||||
archives:
|
|
||||||
title:
|
|
||||||
other: Archiu
|
|
||||||
|
|
||||||
more:
|
|
||||||
other: Mai
|
|
||||||
|
|
||||||
tagCloud:
|
|
||||||
title:
|
|
||||||
other: Etiquetas
|
|
||||||
categoriesCloud:
|
|
||||||
title:
|
|
||||||
other: Categorias
|
|
||||||
|
|
||||||
search:
|
|
||||||
title:
|
|
||||||
other: Cercar
|
|
||||||
|
|
||||||
placeholder:
|
|
||||||
other: Picatz quicòm...
|
|
||||||
|
|
||||||
resultTitle:
|
|
||||||
other: "#PAGES_COUNT paginas dins (#TIME_SECONDS segons)"
|
|
||||||
|
|
||||||
footer:
|
|
||||||
builtWith:
|
|
||||||
other: Creat amb {{ .Generator }}
|
|
||||||
|
|
||||||
designedBy:
|
|
||||||
other: Tàma {{ .Theme }} concebut per {{ .DesignedBy }}
|
|
@ -3,43 +3,5 @@
|
|||||||
<h1 class="article-title">{{ T "notFound.title" }}</h1>
|
<h1 class="article-title">{{ T "notFound.title" }}</h1>
|
||||||
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
|
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- $query := first 1 (where .Site.Pages "Layout" "==" "search") -}}
|
|
||||||
{{- $searchPage := index $query 0 -}}
|
|
||||||
|
|
||||||
{{- with $searchPage -}}
|
|
||||||
<form action="{{ $searchPage.RelPermalink }}" class="search-form widget" {{ with .OutputFormats.Get "json" -}}data-json="{{ .Permalink }}" {{- end }}>
|
|
||||||
<p>
|
|
||||||
<label>{{ T "search.title" }}</label>
|
|
||||||
<input id="searchInput" name="keyword" required placeholder="{{ T `search.placeholder` }}" />
|
|
||||||
|
|
||||||
<button title="{{ T `search.title` }}">
|
|
||||||
{{ partial "helper/icon" "search" }}
|
|
||||||
</button>
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div class="search-result">
|
|
||||||
<h3 class="search-result--title section-title"></h3>
|
|
||||||
<div class="search-result--list article-list--compact"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.searchResultTitleTemplate = "{{ T `search.resultTitle` }}"
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{{- $opts := dict "minify" hugo.IsProduction "JSXFactory" "createElement" -}}
|
|
||||||
{{- $searchScript := resources.Get "ts/search.tsx" | js.Build $opts -}}
|
|
||||||
<script type="text/javascript" src="{{ $searchScript.RelPermalink }}" defer></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const wrongUrl = new URL(window.location.href);
|
|
||||||
|
|
||||||
/// Get the search keyword from the wrong URL by removing all slashes and dashes
|
|
||||||
const searchKeyword = wrongUrl.pathname.split(/[/|-]/).join(' ').trim();
|
|
||||||
|
|
||||||
document.getElementById('searchInput').setAttribute('value', searchKeyword);
|
|
||||||
</script>
|
|
||||||
{{- end -}}
|
|
||||||
{{ partialCached "footer/footer" . }}
|
{{ partialCached "footer/footer" . }}
|
||||||
{{ end }}
|
{{ end }}
|
@ -1,6 +0,0 @@
|
|||||||
<h{{ .Level }} id="{{ .Anchor }}">
|
|
||||||
{{- if site.Params.Article.HeadingAnchor -}}
|
|
||||||
<a href="#{{ .Anchor }}" class="header-anchor"></a>
|
|
||||||
{{- end -}}
|
|
||||||
{{ .Text | safeHTML }}
|
|
||||||
</h{{ .Level }}>
|
|
@ -18,11 +18,11 @@
|
|||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||||
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
|
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||||
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
|
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||||
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||||
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||||
{{- with .OutputFormats.Get "RSS" -}}
|
{{- with .OutputFormats.Get "RSS" -}}
|
||||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||||
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
|
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||||
<guid>{{ .Permalink }}</guid>
|
<guid>{{ .Permalink }}</guid>
|
||||||
<description>
|
<description>
|
||||||
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
|
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<div>
|
<div>
|
||||||
{{ partial "helper/icon" "date" }}
|
{{ partial "helper/icon" "date" }}
|
||||||
<time class="article-time--published">
|
<time class="article-time--published">
|
||||||
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||||
</time>
|
</time>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<section class="article-lastmod">
|
<section class="article-lastmod">
|
||||||
{{ partial "helper/icon" "clock" }}
|
{{ partial "helper/icon" "clock" }}
|
||||||
<span>
|
<span>
|
||||||
{{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
{{ T "article.lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||||
</span>
|
</span>
|
||||||
</section>
|
</section>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -16,12 +16,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ with $link.image }}
|
{{ with $link.image }}
|
||||||
{{ $permalink := . }}
|
|
||||||
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
|
|
||||||
{{ $permalink = .RelPermalink }}
|
|
||||||
{{ end }}
|
|
||||||
<div class="article-image">
|
<div class="article-image">
|
||||||
<img src="{{ $permalink }}" loading="lazy">
|
<img src="{{ . }}" loading="lazy">
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("DOMContentLoaded", () => {
|
window.addEventListener("DOMContentLoaded", () => {
|
||||||
const mainArticleElement = document.querySelector(".main-article");
|
renderMathInElement(document.querySelector(`.article-content`), {
|
||||||
renderMathInElement(mainArticleElement, {
|
|
||||||
delimiters: [
|
delimiters: [
|
||||||
{ left: "$$", right: "$$", display: true },
|
{ left: "$$", right: "$$", display: true },
|
||||||
{ left: "$", right: "$", display: false },
|
{ left: "$", right: "$", display: false },
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{{- $disqusjs := .Site.Params.Comments.disqusjs -}}
|
{{- $disqusjs := .Site.Params.Comments.disqusjs -}}
|
||||||
{{- if and (not $pc.Disable) (and $disqusjs.Shortname $disqusjs.ApiKey) -}}
|
{{- if and (not $pc.Disable) (and $disqusjs.Shortname $disqusjs.ApiKey) -}}
|
||||||
|
|
||||||
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | toCSS | minify -}}
|
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | resources.ToCSS | minify -}}
|
||||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||||
|
|
||||||
<div class="disqus-container">
|
<div class="disqus-container">
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
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 `en` .lang -}}"
|
data-lang="{{- default `en` .lang -}}"
|
||||||
data-loading="{{- .loading -}}"
|
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
async
|
async
|
||||||
></script>
|
></script>
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
admin: ["{{- .admin -}}"],
|
admin: ["{{- .admin -}}"],
|
||||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||||
id: md5(location.pathname), // Max Location.pathname Legth:75 https://github.com/gitalk/gitalk/issues/102
|
id: md5(location.pathname), // Max Location.pathname Legth:75 https://github.com/gitalk/gitalk/issues/102
|
||||||
proxy: {{- .proxy -}},
|
|
||||||
});
|
});
|
||||||
(function () {
|
(function () {
|
||||||
if (
|
if (
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.39/dist/twikoo.all.min.js"></script>
|
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.21/dist/twikoo.all.min.js"></script>
|
||||||
<div id="tcomment"></div>
|
<div id="tcomment"></div>
|
||||||
<style>
|
<style>
|
||||||
.twikoo {
|
.twikoo {
|
||||||
|
@ -14,4 +14,4 @@
|
|||||||
{{ $description = .Summary }}
|
{{ $description = .Summary }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ return (replaceRE "\n" " " $description | plainify) }}
|
{{ return ($description | plainify)}}
|
@ -1,12 +1,12 @@
|
|||||||
{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
|
{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
|
||||||
|
|
||||||
{{- $opts := dict "minify" hugo.IsProduction -}}
|
{{- $opts := dict "minify" hugo.IsProduction -}}
|
||||||
{{- $script := resources.Get "ts/main.ts" | js.Build $opts | fingerprint -}}
|
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
|
||||||
|
|
||||||
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
|
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
|
||||||
|
|
||||||
{{- with resources.Get "ts/custom.ts" -}}
|
{{- with resources.Get "ts/custom.ts" -}}
|
||||||
{{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}}
|
{{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}}
|
||||||
{{- $customScript := . | js.Build $opts | fingerprint -}}
|
{{- $customScript := . | js.Build $opts -}}
|
||||||
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
|
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
|
||||||
{{- end -}}
|
{{- end -}}
|
@ -1,4 +1,4 @@
|
|||||||
{{- $ThemeVersion := "3.30.0" -}}
|
{{- $ThemeVersion := "3.24.0" -}}
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<section class="copyright">
|
<section class="copyright">
|
||||||
©
|
©
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||||
|
|
||||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||||
<meta name='description' {{ printf "content=%q" $description | safeHTMLAttr }}>
|
<meta name='description' content='{{ $description }}'>
|
||||||
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
|
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
|
||||||
|
|
||||||
{{- $title := partial "data/title" . -}}
|
{{- $title := partial "data/title" . -}}
|
||||||
@ -19,7 +19,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ with .Site.Params.favicon }}
|
{{ with .Site.Params.favicon }}
|
||||||
<link rel="shortcut icon" href="{{ . | relURL }}" />
|
<link rel="shortcut icon" href="{{ . }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- template "_internal/google_analytics.html" . -}}
|
{{- template "_internal/google_analytics.html" . -}}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||||
|
|
||||||
<meta property='og:title' {{ printf "content=%q" $title | safeHTMLAttr }}>
|
<meta property='og:title' content='{{ $title }}'>
|
||||||
<meta property='og:description' {{ printf "content=%q" $description | safeHTMLAttr }}>
|
<meta property='og:description' content='{{ $description }}'>
|
||||||
<meta property='og:url' content='{{ .Permalink }}'>
|
<meta property='og:url' content='{{ .Permalink }}'>
|
||||||
<meta property='og:site_name' content='{{ .Site.Title }}'>
|
<meta property='og:site_name' content='{{ .Site.Title }}'>
|
||||||
<meta property='og:type' content='
|
<meta property='og:type' content='
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||||
|
|
||||||
<meta name="twitter:title" {{ printf "content=%q" $title | safeHTMLAttr }}>
|
<meta name="twitter:title" content="{{ $title }}">
|
||||||
<meta name="twitter:description" {{ printf "content=%q" $description | safeHTMLAttr }}>
|
<meta name="twitter:description" content="{{ $description }}">
|
||||||
|
|
||||||
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}}
|
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}}
|
||||||
{{- if $image.exists -}}
|
{{- if $image.exists -}}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{{ $sass := resources.Get "scss/style.scss" }}
|
{{ $sass := resources.Get "scss/style.scss" }}
|
||||||
{{ $style := $sass | toCSS | minify | resources.Fingerprint "sha256" }}
|
{{ $style := $sass | resources.ToCSS | minify | resources.Fingerprint "sha256" }}
|
||||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
@ -38,7 +38,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{- with .Site.Menus.social -}}
|
{{- with .Site.Menus.social -}}
|
||||||
<ol class="menu-social">
|
<ol class="social-menu">
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
@ -65,7 +65,7 @@
|
|||||||
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
||||||
{{ $icon := default .Pre .Params.Icon }}
|
{{ $icon := default .Pre .Params.Icon }}
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://stack.jimmycai.com/config/menu" .URL }}
|
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://docs.stack.jimmycai.com/configuration/custom-menu.html" .URL }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with $icon }}
|
{{ with $icon }}
|
||||||
{{ partial "helper/icon" . }}
|
{{ partial "helper/icon" . }}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
publish = "exampleSite/public"
|
publish = "exampleSite/public"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.124.0"
|
HUGO_VERSION = "0.123.8"
|
||||||
HUGO_THEME = "repo"
|
HUGO_THEME = "repo"
|
||||||
|
|
||||||
[context.production]
|
[context.production]
|
||||||
|
Loading…
Reference in New Issue
Block a user