mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
Compare commits
86 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9e6b7b22a9 | ||
|
f1ab6c6aba | ||
|
087989e427 | ||
|
0991f61d49 | ||
|
839fbd0ecb | ||
|
5175ac5ae3 | ||
|
37f1541c20 | ||
|
f4eb5d3e99 | ||
|
788dd497b3 | ||
|
8a7fb33163 | ||
|
2a18a92901 | ||
|
245b0f2810 | ||
|
0fb25c808b | ||
|
048a000f17 | ||
|
5f157478aa | ||
|
8556681b7c | ||
|
fa760d70cb | ||
|
bdcab89d86 | ||
|
b3907acdae | ||
|
23ff70d41a | ||
|
41a3e5ee13 | ||
|
0558108e30 | ||
|
12f31dfd8a | ||
|
374b25a60f | ||
|
fcd56dd21c | ||
|
fddab05362 | ||
|
f3783856ad | ||
|
130e2f6607 | ||
|
ce798a32a9 | ||
|
609d43b088 | ||
|
797949b37f | ||
|
539c39d69a | ||
|
f8466d94d2 | ||
|
43e074364c | ||
|
b2157bdf78 | ||
|
23607527e4 | ||
|
54a8ace564 | ||
|
b3fbe78ca5 | ||
|
2cb5ba683b | ||
|
5a8607e4a8 | ||
|
eafcf894c8 | ||
|
0b9f6c36ad | ||
|
04bf1956b9 | ||
|
6c7d42d45a | ||
|
2cda779706 | ||
|
4948a3723e | ||
|
43224bd39a | ||
|
4e7865c185 | ||
|
2f9306502d | ||
|
5b0d6fdf7d | ||
|
65cd7f586f | ||
|
f398fb9dd1 | ||
|
9bb3165ff0 | ||
|
405e84291a | ||
|
800f815988 | ||
|
255abd5c88 | ||
|
f53fc128bd | ||
|
188e49ef41 | ||
|
76dc61f0d5 | ||
|
03ee3369e1 | ||
|
21da06e448 | ||
|
20bf719411 | ||
|
bdb9e7fc00 | ||
|
5c98a38a80 | ||
|
bda734fb23 | ||
|
70bcf9cbe0 | ||
|
6f1d676948 | ||
|
d84d0a8522 | ||
|
418d5677b1 | ||
|
be4fd55095 | ||
|
d3682b3567 | ||
|
ce0a252bfa | ||
|
d11923f32b | ||
|
40712eb781 | ||
|
d197d9b249 | ||
|
c6d1d73dd2 | ||
|
5d90624441 | ||
|
5edd4afaf3 | ||
|
41c3033d1a | ||
|
4e2e90da4c | ||
|
eefa686661 | ||
|
1668ebc3e4 | ||
|
f7e442cabb | ||
|
cabaf06ef2 | ||
|
26d2859f70 | ||
|
51e0ec7f99 |
26
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
26
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -1,17 +1,15 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "[Bug]: "
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
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://docs.stack.jimmycai.com/).
|
||||
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/).
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: Also tell us, what did you expect to happen? Please be as detailed as possible, include screenshots and any other information that might help us reproduce the problem.
|
||||
description: Also tell us, what did you expect to happen? Please be as detailed as possible, including screenshots and any other information that might help us reproduce the problem.
|
||||
placeholder: Tell us what you see!
|
||||
validations:
|
||||
required: true
|
||||
@ -55,21 +53,13 @@ body:
|
||||
label: Relevant log output
|
||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
If the issue is not present on the [demo site](https://demo.stack.jimmycai.com), in order to better understand the problem, please provide the link to the source code of your website (not the generated HTML).
|
||||
Or link to a minimal reproduction of the problem if there are sensible data.
|
||||
- type: input
|
||||
id: bug-url
|
||||
id: minimal-reproduction-url
|
||||
attributes:
|
||||
label: Link to the page with bug
|
||||
placeholder: https://demo.stack.jimmycai.com
|
||||
value: https://demo.stack.jimmycai.com
|
||||
label: Link to Minimal Reproducible Example
|
||||
description: |
|
||||
Use [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJimmy/hugo-theme-stack-starter) to create a minimal reproduction of the problem.
|
||||
A minimal reproduction is required so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed.
|
||||
placeholder: https://github.com/username/your-repository
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: source-repo
|
||||
attributes:
|
||||
label: Link to the source repository
|
||||
placeholder: https://github.com/CaiJimmy/hugo-theme-stack
|
||||
|
@ -54,6 +54,7 @@
|
||||
}
|
||||
|
||||
.article-title {
|
||||
font-family: var(--article-font-family);
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
color: var(--card-text-color-main);
|
||||
@ -92,16 +93,15 @@
|
||||
.article-time,
|
||||
.article-translations {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--card-text-color-tertiary);
|
||||
gap: 15px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
stroke-width: 1.33;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
time,
|
||||
@ -117,10 +117,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
.article-time {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.article-translations {
|
||||
& > div {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
.article-category,
|
||||
.article-tags {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
a {
|
||||
color: var(--accent-color-text);
|
||||
|
@ -55,6 +55,7 @@
|
||||
margin-right: 0.4em;
|
||||
padding: 0 0.4em 0 0.4em;
|
||||
color: #7f7f7f;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* LineNumbers */
|
||||
|
@ -33,6 +33,10 @@
|
||||
margin: var(--card-padding) 0;
|
||||
color: var(--card-text-color-main);
|
||||
|
||||
.footnotes {
|
||||
font-family: var(--base-font-family);
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
@ -63,7 +67,6 @@
|
||||
}
|
||||
|
||||
.article-tags {
|
||||
flex-wrap: wrap;
|
||||
text-transform: unset;
|
||||
}
|
||||
|
||||
@ -218,6 +221,28 @@
|
||||
margin-inline-start: calc((var(--card-padding)) * -1);
|
||||
padding-inline-start: calc(var(--card-padding) - var(--heading-border-size));
|
||||
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 {
|
||||
@ -264,6 +289,11 @@
|
||||
font-family: var(--code-font-family);
|
||||
}
|
||||
|
||||
a,
|
||||
code {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.gallery {
|
||||
position: relative;
|
||||
display: flex;
|
||||
@ -418,4 +448,14 @@
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
kbd {
|
||||
border: 1px solid var(--kbd-border-color);
|
||||
font-weight: bold;
|
||||
font-size: 0.9em;
|
||||
line-height: 1;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
@ -127,10 +127,8 @@
|
||||
}
|
||||
|
||||
/* Menu style */
|
||||
.menu {
|
||||
padding-left: 0;
|
||||
#main-menu {
|
||||
list-style: none;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
flex-grow: 1;
|
||||
font-size: 1.4rem;
|
||||
@ -141,13 +139,15 @@
|
||||
margin: 0 calc(var(--container-padding) * -1);
|
||||
|
||||
padding: 30px 30px;
|
||||
|
||||
@include respond(xl) {
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
&,
|
||||
.menu-bottom-section {
|
||||
&, .menu-bottom-section ol {
|
||||
flex-direction: column;
|
||||
gap: 30px;
|
||||
|
||||
@include respond(xl) {
|
||||
gap: 25px;
|
||||
}
|
||||
@ -176,8 +176,8 @@
|
||||
}
|
||||
|
||||
svg {
|
||||
stroke: currentColor;
|
||||
stroke-width: 1.33;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
@ -200,17 +200,19 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-bottom-section {
|
||||
margin-top: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
&.menu-bottom-section {
|
||||
margin-top: auto;
|
||||
|
||||
ol {
|
||||
display: flex;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.social-menu {
|
||||
.menu-social {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
@ -16,7 +16,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
--accent-color: #34495e;
|
||||
--accent-color-darker: #2c3e50;
|
||||
--accent-color-text: #fff;
|
||||
--body-text-color: #bababa;
|
||||
--body-text-color: #707070;
|
||||
|
||||
--tag-border-radius: 4px;
|
||||
|
||||
@ -44,7 +44,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
--zh-font-family: "PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei";
|
||||
|
||||
--base-font-family: "Lato", var(--sys-font-family), var(--zh-font-family), sans-serif;
|
||||
--code-font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||
--code-font-family: Menlo, Monaco, Consolas, "Courier New", var(--zh-font-family), monospace;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -56,7 +56,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
|
||||
--card-text-color-main: #000;
|
||||
--card-text-color-secondary: #747474;
|
||||
--card-text-color-tertiary: #bababa;
|
||||
--card-text-color-tertiary: #767676;
|
||||
--card-separator-color: rgba(218, 218, 218, 0.5);
|
||||
|
||||
--card-border-radius: 10px;
|
||||
@ -123,6 +123,8 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
--table-border-color: #dadada;
|
||||
--tr-even-background-color: #efefee;
|
||||
|
||||
--kbd-border-color: #dadada;
|
||||
|
||||
&[data-scheme="dark"] {
|
||||
--code-background-color: #272822;
|
||||
--code-text-color: rgba(255, 255, 255, 0.9);
|
||||
|
@ -8,6 +8,10 @@ class StackColorScheme {
|
||||
constructor(toggleEl: HTMLElement) {
|
||||
this.bindMatchMedia();
|
||||
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);
|
||||
|
||||
|
@ -53,7 +53,14 @@ class Search {
|
||||
this.resultTitle = resultTitle;
|
||||
this.resultTitleTemplate = resultTitleTemplate;
|
||||
|
||||
this.handleQueryString();
|
||||
/// 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.bindQueryStringChange();
|
||||
this.bindSearchForm();
|
||||
}
|
||||
@ -227,6 +234,7 @@ class Search {
|
||||
Search.updateQueryString(keywords, true);
|
||||
|
||||
if (keywords === '') {
|
||||
lastSearch = '';
|
||||
return this.clear();
|
||||
}
|
||||
|
||||
|
16
config.yaml
16
config.yaml
@ -28,6 +28,7 @@ params:
|
||||
src: img/avatar.png
|
||||
|
||||
article:
|
||||
headingAnchor: false
|
||||
math: false
|
||||
toc: true
|
||||
readingTime: true
|
||||
@ -51,6 +52,12 @@ params:
|
||||
issueTerm: pathname
|
||||
label:
|
||||
|
||||
beaudar:
|
||||
repo:
|
||||
issueTerm: pathname
|
||||
label:
|
||||
theme:
|
||||
|
||||
remark42:
|
||||
host:
|
||||
site:
|
||||
@ -64,7 +71,7 @@ params:
|
||||
clientSecret:
|
||||
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:
|
||||
serverURL:
|
||||
lang:
|
||||
@ -73,12 +80,11 @@ params:
|
||||
emoji:
|
||||
- https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo
|
||||
requiredMeta:
|
||||
- name
|
||||
- email
|
||||
- url
|
||||
placeholder:
|
||||
- nick
|
||||
- mail
|
||||
locale:
|
||||
admin: Admin
|
||||
placeholder:
|
||||
|
||||
twikoo:
|
||||
envId:
|
||||
|
@ -21,17 +21,17 @@ PhotoSwipe:
|
||||
type: style
|
||||
|
||||
KaTeX:
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.css
|
||||
integrity: sha256-J+iAE0sgH8QSz9hpcDxXIftnj65JEZgNhGcgReTTK9s=
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css
|
||||
integrity: sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV
|
||||
type: style
|
||||
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.js
|
||||
integrity: sha256-InsNdER1b2xUewP+pKCUJpkhiqwHgqiPXDlIk7GzBu4=
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js
|
||||
integrity: sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8
|
||||
type: script
|
||||
defer: true
|
||||
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/contrib/auto-render.min.js
|
||||
integrity: sha256-y39Mpg7V3D4lhBX4x6O0bUqTV4pSrfgwEfGKfxkOdgI=
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js
|
||||
integrity: sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05
|
||||
type: script
|
||||
defer: true
|
||||
|
||||
|
@ -1 +1,3 @@
|
||||
Example site modified from https://github.com/gohugoio/hugoBasicExample
|
||||
This is an example site used for solely for testing purposes. **It is not meant to be used as a template for your site**.
|
||||
|
||||
To create a new site, please use the starter template: [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJimmy/hugo-theme-stack-starter/)
|
@ -15,7 +15,7 @@ menu:
|
||||
icon: user
|
||||
---
|
||||
|
||||
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
|
||||
Written in Go, Hugo is an open source static site generator available under the [Apache License 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
|
||||
|
||||
Hugo makes use of a variety of open source projects including:
|
||||
|
||||
@ -29,6 +29,6 @@ Hugo is ideal for blogs, corporate websites, creative portfolios, online magazin
|
||||
|
||||
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
|
||||
|
||||
Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
|
||||
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
|
||||
|
||||
Learn more and contribute on [GitHub](https://github.com/gohugoio).
|
||||
|
@ -159,7 +159,7 @@ H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
|
||||
Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
||||
|
||||
|
@ -21,27 +21,23 @@ In this example we will be using [KaTeX](https://katex.org/)
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
|
||||
- To enable KaTex on a per page basis include the parameter `math: true` in content files
|
||||
- To enable KaTeX globally set the parameter `math` to `true` in a project's configuration
|
||||
- To enable KaTeX on a per page basis include the parameter `math: true` in content files
|
||||
|
||||
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
|
||||
|
||||
{{< math.inline >}}
|
||||
{{ if or .Page.Params.math .Site.Params.math }}
|
||||
<!-- KaTeX -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
||||
{{ end }}
|
||||
{{</ math.inline >}}
|
||||
|
||||
### Examples
|
||||
|
||||
{{< math.inline >}}
|
||||
<p>
|
||||
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
|
||||
</p>
|
||||
{{</ math.inline >}}
|
||||
Inline math: $\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…$
|
||||
|
||||
Block math:
|
||||
$$
|
||||
|
@ -1,32 +1,8 @@
|
||||
baseurl: https://example.com
|
||||
baseurl: https://example.com/
|
||||
languageCode: en-us
|
||||
theme: hugo-theme-stack
|
||||
paginate: 5
|
||||
title: Example Site
|
||||
|
||||
languages:
|
||||
en:
|
||||
languageName: English
|
||||
title: Example Site
|
||||
description: Example description
|
||||
weight: 1
|
||||
zh-cn:
|
||||
languageName: 中文
|
||||
title: 演示站点
|
||||
description: 演示说明
|
||||
weight: 2
|
||||
ar:
|
||||
languageName: عربي
|
||||
languagedirection: rtl
|
||||
title: موقع تجريبي
|
||||
description: وصف تجريبي
|
||||
weight: 3
|
||||
|
||||
# Change it to your Disqus shortname before using
|
||||
disqusShortname: hugo-theme-stack
|
||||
|
||||
# GA Tracking ID
|
||||
googleAnalytics:
|
||||
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
|
||||
@ -36,6 +12,41 @@ DefaultContentLanguage: en
|
||||
# This will make .Summary and .WordCount behave correctly for CJK languages.
|
||||
hasCJKLanguage: false
|
||||
|
||||
languages:
|
||||
en:
|
||||
languageName: English
|
||||
title: Example Site
|
||||
weight: 1
|
||||
params:
|
||||
sidebar:
|
||||
subtitle: Example description
|
||||
zh-cn:
|
||||
languageName: 中文
|
||||
title: 演示站点
|
||||
weight: 2
|
||||
params:
|
||||
sidebar:
|
||||
subtitle: 演示说明
|
||||
ar:
|
||||
languageName: عربي
|
||||
languagedirection: rtl
|
||||
title: موقع تجريبي
|
||||
weight: 3
|
||||
params:
|
||||
sidebar:
|
||||
subtitle: وصف تجريبي
|
||||
|
||||
services:
|
||||
# Change it to your Disqus shortname before using
|
||||
disqus:
|
||||
shortname: "hugo-theme-stack"
|
||||
# GA Tracking ID
|
||||
googleAnalytics:
|
||||
id:
|
||||
|
||||
pagination:
|
||||
pagerSize: 3
|
||||
|
||||
permalinks:
|
||||
post: /p/:slug/
|
||||
page: /:slug/
|
||||
@ -45,7 +56,7 @@ params:
|
||||
- post
|
||||
featuredImageField: image
|
||||
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:
|
||||
since: 2020
|
||||
@ -87,6 +98,12 @@ params:
|
||||
issueTerm: pathname
|
||||
label:
|
||||
|
||||
beaudar:
|
||||
repo:
|
||||
issueTerm: pathname
|
||||
label:
|
||||
theme:
|
||||
|
||||
remark42:
|
||||
host:
|
||||
site:
|
||||
@ -144,6 +161,7 @@ params:
|
||||
repo:
|
||||
clientID:
|
||||
clientSecret:
|
||||
proxy:
|
||||
|
||||
cusdis:
|
||||
host:
|
||||
@ -191,7 +209,7 @@ params:
|
||||
enabled: true
|
||||
|
||||
### Custom menu
|
||||
### See https://docs.stack.jimmycai.com/configuration/custom-menu.html
|
||||
### See https://stack.jimmycai.com/config/menu
|
||||
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
|
||||
menu:
|
||||
main: []
|
||||
@ -222,9 +240,21 @@ related:
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
extensions:
|
||||
passthrough:
|
||||
enable: true
|
||||
delimiters:
|
||||
block:
|
||||
- - \[
|
||||
- \]
|
||||
- - $$
|
||||
- $$
|
||||
inline:
|
||||
- - \(
|
||||
- \)
|
||||
renderer:
|
||||
## Set to true if you have HTML content inside Markdown
|
||||
unsafe: false
|
||||
unsafe: true
|
||||
tableOfContents:
|
||||
endLevel: 4
|
||||
ordered: true
|
@ -68,7 +68,7 @@ search:
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: "مبني بستخدام {{ .Generator }}"
|
||||
other: "مبني باستخدام {{ .Generator }}"
|
||||
|
||||
designedBy:
|
||||
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"
|
||||
|
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 }}
|
73
i18n/bg.yaml
Normal file
73
i18n/bg.yaml
Normal file
@ -0,0 +1,73 @@
|
||||
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 }}
|
73
i18n/cs.yaml
Normal file
73
i18n/cs.yaml
Normal file
@ -0,0 +1,73 @@
|
||||
toggleMenu:
|
||||
other: Skrýt menu
|
||||
|
||||
darkMode:
|
||||
other: Tmavý režim
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} stránka"
|
||||
other: "{{ .Count }} stránek"
|
||||
|
||||
section:
|
||||
other: Kategorie
|
||||
|
||||
subsection:
|
||||
one: Podkategorie
|
||||
other: Podkategorie
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Zpět
|
||||
|
||||
tableOfContents:
|
||||
other: Obsah
|
||||
|
||||
relatedContent:
|
||||
other: Související
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Naposledy aktualizováno
|
||||
|
||||
readingTime:
|
||||
one: "{{ .Count }} minuta"
|
||||
other: "{{ .Count }} minut"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Nenalezeno
|
||||
|
||||
subtitle:
|
||||
other: Tato stránka neexistuje
|
||||
|
||||
widget:
|
||||
archives:
|
||||
title:
|
||||
other: Archivy
|
||||
|
||||
more:
|
||||
other: Více
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Štítky
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: Kategorie
|
||||
|
||||
search:
|
||||
title:
|
||||
other: Hledat
|
||||
|
||||
placeholder:
|
||||
other: Zadejte něco...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT stránek (#TIME_SECONDS sekund)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Vytvořeno pomocí {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: Šablona {{ .Theme }} od {{ .DesignedBy }}
|
10
i18n/es.yaml
10
i18n/es.yaml
@ -1,5 +1,5 @@
|
||||
toggleMenu:
|
||||
other: Toggle Menu
|
||||
other: Ocultar menú
|
||||
|
||||
darkMode:
|
||||
other: Modo oscuro
|
||||
@ -27,11 +27,11 @@ article:
|
||||
other: Contenidos relacionados
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Última vez actualizado
|
||||
other: Última actualización
|
||||
|
||||
readingTime:
|
||||
one: "{{ .Count }} minuto a leer"
|
||||
other: "{{ .Count }} minutos a leer"
|
||||
one: "Tiempo de lectura {{ .Count }} minuto"
|
||||
other: "Tiempo de lectura {{ .Count }} minutos"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
@ -60,7 +60,7 @@ search:
|
||||
other: Búsqueda
|
||||
|
||||
placeholder:
|
||||
other: Teclea algo...
|
||||
other: Escribe algo...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)"
|
||||
|
@ -50,6 +50,9 @@ widget:
|
||||
tagCloud:
|
||||
title:
|
||||
other: Mots clés
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: Catégories
|
||||
|
||||
search:
|
||||
title:
|
||||
|
73
i18n/hi.yaml
Normal file
73
i18n/hi.yaml
Normal file
@ -0,0 +1,73 @@
|
||||
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 }} मिनट पढ़ें"
|
||||
other: "{{ .Count }} मिनट पढ़ें"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: 404 नहीं मिला।
|
||||
|
||||
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 }}
|
12
i18n/ja.yaml
12
i18n/ja.yaml
@ -4,6 +4,16 @@ toggleMenu:
|
||||
darkMode:
|
||||
other: ダークモード
|
||||
|
||||
list:
|
||||
page:
|
||||
other: "{{ .Count }} ページ目"
|
||||
|
||||
section:
|
||||
other: セクション
|
||||
|
||||
subsection:
|
||||
other: サブセクション
|
||||
|
||||
article:
|
||||
back:
|
||||
other: 前のページ
|
||||
@ -54,7 +64,7 @@ search:
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Built with {{ .Generator }}
|
||||
other: "{{ .Generator }} で構築されています。"
|
||||
|
||||
designedBy:
|
||||
other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。
|
||||
|
@ -21,6 +21,8 @@ article:
|
||||
other: Gerelateerde inhoud
|
||||
lastUpdatedOn:
|
||||
other: Laatst bijgewerkt op
|
||||
readingTime:
|
||||
other: "{{ .Count }} leestijd"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
|
72
i18n/oc.yaml
Normal file
72
i18n/oc.yaml
Normal file
@ -0,0 +1,72 @@
|
||||
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 }}
|
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 }}
|
@ -4,6 +4,13 @@ toggleMenu:
|
||||
darkMode:
|
||||
other: 暗色模式
|
||||
|
||||
list:
|
||||
page: "{{ .Count }} 个页面"
|
||||
|
||||
section: 章节
|
||||
|
||||
subsection: 子章节
|
||||
|
||||
article:
|
||||
back:
|
||||
other: 返回
|
||||
@ -54,7 +61,7 @@ search:
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Built with {{ .Generator }}
|
||||
other: 使用 {{ .Generator }} 构建
|
||||
|
||||
designedBy:
|
||||
other: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计
|
||||
|
@ -3,5 +3,43 @@
|
||||
<h1 class="article-title">{{ T "notFound.title" }}</h1>
|
||||
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
|
||||
</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" . }}
|
||||
{{ end }}
|
6
layouts/_default/_markup/render-heading.html
Normal file
6
layouts/_default/_markup/render-heading.html
Normal file
@ -0,0 +1,6 @@
|
||||
<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>
|
||||
<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 }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end -}}
|
||||
@ -35,7 +35,7 @@
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>
|
||||
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{{ define "body-class" }}template-search{{ end }}
|
||||
{{ define "head" }}
|
||||
{{- with .OutputFormats.Get "json" -}}
|
||||
<link rel="preload" href="{{ .Permalink }}" as="fetch" crossorigin="anonymous">
|
||||
<link rel="preload" href="{{ .RelPermalink }}" as="fetch" crossorigin="anonymous">
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{ define "main" }}
|
||||
<form action="{{ .Permalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .Permalink }}"{{- end }}>
|
||||
<form action="{{ .RelPermalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .RelPermalink }}"{{- end }}>
|
||||
<p>
|
||||
<label>{{ T "search.title" }}</label>
|
||||
<input name="keyword" placeholder="{{ T `search.placeholder` }}" />
|
||||
|
@ -32,7 +32,7 @@
|
||||
<div>
|
||||
{{ partial "helper/icon" "date" }}
|
||||
<time class="article-time--published">
|
||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
</time>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -12,7 +12,7 @@
|
||||
<section class="article-lastmod">
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<span>
|
||||
{{ T "article.lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||
{{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||
</span>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
@ -16,8 +16,12 @@
|
||||
</div>
|
||||
|
||||
{{ with $link.image }}
|
||||
{{ $permalink := . }}
|
||||
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
|
||||
{{ $permalink = .RelPermalink }}
|
||||
{{ end }}
|
||||
<div class="article-image">
|
||||
<img src="{{ . }}" loading="lazy">
|
||||
<img src="{{ $permalink }}" loading="lazy">
|
||||
</div>
|
||||
{{ end }}
|
||||
</a>
|
||||
|
@ -1,7 +1,8 @@
|
||||
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
renderMathInElement(document.querySelector(`.article-content`), {
|
||||
const mainArticleElement = document.querySelector(".main-article");
|
||||
renderMathInElement(mainArticleElement, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
@ -10,4 +11,4 @@
|
||||
],
|
||||
ignoredClasses: ["gist"]
|
||||
});})
|
||||
</script>
|
||||
</script>
|
||||
|
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>
|
@ -2,7 +2,7 @@
|
||||
{{- $disqusjs := .Site.Params.Comments.disqusjs -}}
|
||||
{{- if and (not $pc.Disable) (and $disqusjs.Shortname $disqusjs.ApiKey) -}}
|
||||
|
||||
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | resources.ToCSS | minify -}}
|
||||
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | toCSS | minify -}}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
|
||||
<div class="disqus-container">
|
||||
|
@ -12,6 +12,7 @@
|
||||
data-input-position="{{- default `top` .inputPosition -}}"
|
||||
data-theme="{{- default `light` .lightTheme -}}"
|
||||
data-lang="{{- default `en` .lang -}}"
|
||||
data-loading="{{- .loading -}}"
|
||||
crossorigin="anonymous"
|
||||
async
|
||||
></script>
|
||||
|
@ -15,6 +15,7 @@
|
||||
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
|
||||
proxy: {{- .proxy -}},
|
||||
});
|
||||
(function () {
|
||||
if (
|
||||
|
@ -1,4 +1,4 @@
|
||||
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.11/dist/twikoo.all.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.39/dist/twikoo.all.min.js"></script>
|
||||
<div id="tcomment"></div>
|
||||
<style>
|
||||
.twikoo {
|
||||
@ -13,7 +13,9 @@
|
||||
}
|
||||
.twikoo .el-input-group__prepend,
|
||||
.twikoo .tk-action-icon,
|
||||
.twikoo .tk-submit-action-icon,
|
||||
.twikoo .tk-time,
|
||||
.twikoo .tk-comments-no,
|
||||
.twikoo .tk-comments-count {
|
||||
color: var(--twikoo-body-text-color);
|
||||
}
|
||||
@ -28,6 +30,9 @@
|
||||
.twikoo .el-button{
|
||||
color: var(--twikoo-body-text-color)!important;
|
||||
}
|
||||
.twikoo .el-input__count {
|
||||
color: var(--twikoo-body-text-color) !important;
|
||||
}
|
||||
.OwO .OwO-body {
|
||||
background-color: var(--body-background) !important;
|
||||
color: var(--body-text-color) !important;
|
||||
|
@ -19,7 +19,7 @@
|
||||
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}}
|
||||
|
||||
{{- range $key, $val := . -}}
|
||||
{{- if $val -}}
|
||||
{{- if ne $val nil -}}
|
||||
{{- $replaceKey := index $replaceKeys $key -}}
|
||||
{{- $k := default $key $replaceKey -}}
|
||||
|
||||
|
@ -14,4 +14,4 @@
|
||||
{{ $description = .Summary }}
|
||||
{{ end }}
|
||||
|
||||
{{ return ($description | plainify)}}
|
||||
{{ return (replaceRE "\n" " " $description | plainify) }}
|
@ -1,12 +1,12 @@
|
||||
{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
|
||||
|
||||
{{- $opts := dict "minify" hugo.IsProduction -}}
|
||||
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
|
||||
{{- $script := resources.Get "ts/main.ts" | js.Build $opts | fingerprint -}}
|
||||
|
||||
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
|
||||
|
||||
{{- with resources.Get "ts/custom.ts" -}}
|
||||
{{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}}
|
||||
{{- $customScript := . | js.Build $opts -}}
|
||||
{{- $customScript := . | js.Build $opts | fingerprint -}}
|
||||
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
|
||||
{{- end -}}
|
@ -1,11 +1,11 @@
|
||||
{{- $ThemeVersion := "3.17.0" -}}
|
||||
{{- $ThemeVersion := "3.30.0" -}}
|
||||
<footer class="site-footer">
|
||||
<section class="copyright">
|
||||
©
|
||||
{{ if and (.Site.Params.footer.since) (ne .Site.Params.footer.since (int (now.Format "2006"))) }}
|
||||
{{ .Site.Params.footer.since }} -
|
||||
{{ end }}
|
||||
{{ now.Format "2006" }} {{ .Site.Title }}
|
||||
{{ now.Format "2006" }} {{ default .Site.Title .Site.Copyright }}
|
||||
</section>
|
||||
|
||||
<section class="powerby">
|
||||
|
@ -2,10 +2,10 @@
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||
|
||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||
<meta name='description' content='{{ $description }}'>
|
||||
<meta name='description' {{ printf "content=%q" $description | safeHTMLAttr }}>
|
||||
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
|
||||
|
||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
{{- $title := partial "data/title" . -}}
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
<link rel='canonical' href='{{ .Permalink }}'>
|
||||
@ -19,7 +19,7 @@
|
||||
{{- end -}}
|
||||
|
||||
{{ with .Site.Params.favicon }}
|
||||
<link rel="shortcut icon" href="{{ . }}" />
|
||||
<link rel="shortcut icon" href="{{ . | relURL }}" />
|
||||
{{ end }}
|
||||
|
||||
{{- template "_internal/google_analytics.html" . -}}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||
|
||||
<meta property='og:title' content='{{ $title }}'>
|
||||
<meta property='og:description' content='{{ $description }}'>
|
||||
<meta property='og:title' {{ printf "content=%q" $title | safeHTMLAttr }}>
|
||||
<meta property='og:description' {{ printf "content=%q" $description | safeHTMLAttr }}>
|
||||
<meta property='og:url' content='{{ .Permalink }}'>
|
||||
<meta property='og:site_name' content='{{ .Site.Title }}'>
|
||||
<meta property='og:type' content='
|
||||
@ -32,8 +32,8 @@
|
||||
<meta property='article:modified_time' content='{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if not .Site.LastChange.IsZero -}}
|
||||
<meta property='og:updated_time' content='{{ .Site.LastChange.Format " 2006-01-02T15:04:05-07:00 " | safeHTML }}'/>
|
||||
{{- if not .Site.Lastmod.IsZero -}}
|
||||
<meta property='og:updated_time' content='{{ .Site.Lastmod.Format " 2006-01-02T15:04:05-07:00 " | safeHTML }}'/>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
<meta name="twitter:description" content="{{ $description }}">
|
||||
<meta name="twitter:title" {{ printf "content=%q" $title | safeHTMLAttr }}>
|
||||
<meta name="twitter:description" {{ printf "content=%q" $description | safeHTMLAttr }}>
|
||||
|
||||
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}}
|
||||
{{- if $image.exists -}}
|
||||
|
@ -1,3 +1,3 @@
|
||||
{{ $sass := resources.Get "scss/style.scss" }}
|
||||
{{ $style := $sass | resources.ToCSS | minify | resources.Fingerprint "sha256" }}
|
||||
{{ $style := $sass | toCSS | minify | resources.Fingerprint "sha256" }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
@ -38,7 +38,7 @@
|
||||
</header>
|
||||
|
||||
{{- with .Site.Menus.social -}}
|
||||
<ol class="social-menu">
|
||||
<ol class="menu-social">
|
||||
{{ range . }}
|
||||
<li>
|
||||
<a
|
||||
@ -65,7 +65,7 @@
|
||||
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
||||
{{ $icon := default .Pre .Params.Icon }}
|
||||
{{ if .Pre }}
|
||||
{{ 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 }}
|
||||
{{ 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 }}
|
||||
{{ end }}
|
||||
{{ with $icon }}
|
||||
{{ partial "helper/icon" . }}
|
||||
@ -74,27 +74,30 @@
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="menu-bottom-section">
|
||||
<ol class="menu">
|
||||
{{- $currentLanguageCode := .Language.Lang -}}
|
||||
{{ if ( compare.Gt .Site.Home.AllTranslations.Len 1 ) }}
|
||||
{{ with .Site.Home.AllTranslations }}
|
||||
<li id="i18n-switch">
|
||||
{{ partial "helper/icon" "language" }}
|
||||
<select name="language" title="language" onchange="window.location.href = this.selectedOptions[0].value">
|
||||
{{ range . }}
|
||||
<option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div class="menu-bottom-section">
|
||||
{{- $currentLanguageCode := .Language.Lang -}}
|
||||
{{ with .Site.Home.AllTranslations }}
|
||||
<li id="i18n-switch">
|
||||
{{ partial "helper/icon" "language" }}
|
||||
<select name="language" onchange="window.location.href = this.selectedOptions[0].value">
|
||||
{{ range . }}
|
||||
<option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ if (default false .Site.Params.colorScheme.toggle) }}
|
||||
<li id="dark-mode-toggle">
|
||||
{{ partial "helper/icon" "toggle-left" }}
|
||||
{{ partial "helper/icon" "toggle-right" }}
|
||||
<span>{{ T "darkMode" }}</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if (default false .Site.Params.colorScheme.toggle) }}
|
||||
<li id="dark-mode-toggle">
|
||||
{{ partial "helper/icon" "toggle-left" }}
|
||||
{{ partial "helper/icon" "toggle-right" }}
|
||||
<span>{{ T "darkMode" }}</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
</aside>
|
||||
|
@ -4,7 +4,10 @@
|
||||
<aside class="sidebar right-sidebar sticky">
|
||||
{{ range $widget := . }}
|
||||
{{ 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 }}
|
||||
{{ warnf "Widget %s not found" .type }}
|
||||
{{ end }}
|
||||
|
@ -2,7 +2,7 @@
|
||||
publish = "exampleSite/public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.100.2"
|
||||
HUGO_VERSION = "0.124.0"
|
||||
HUGO_THEME = "repo"
|
||||
|
||||
[context.production]
|
||||
|
@ -20,7 +20,7 @@ features = [
|
||||
"search",
|
||||
]
|
||||
|
||||
min_version = "0.87.0"
|
||||
min_version = "0.123.0"
|
||||
|
||||
[author]
|
||||
name = "Jimmy Cai"
|
||||
|
Loading…
Reference in New Issue
Block a user