Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
230468d613 | ||
|
|
0afa502cdd | ||
|
|
90e7761967 | ||
|
|
5d1a7b8768 | ||
|
|
28ab0dd980 | ||
|
|
1857909fe4 | ||
|
|
b7d4048298 | ||
|
|
45a944412c | ||
|
|
1fa573dae3 | ||
|
|
ac18f600c1 | ||
|
|
46908815fc | ||
|
|
be2defe8fb | ||
|
|
94a14a4665 | ||
|
|
7ebe7e1af8 | ||
|
|
42eb1f5067 | ||
|
|
0c8643e458 |
@@ -9,9 +9,9 @@
|
|||||||
|
|
||||||
[](https://app.netlify.com/sites/hugo-theme-stack/deploys)
|
[](https://app.netlify.com/sites/hugo-theme-stack/deploys)
|
||||||
|
|
||||||
## Documentation & more information
|
## Documentation
|
||||||
|
|
||||||
[Documentation](https://docs.stack.jimmycai.com/) | [中文文档](https://docs.stack.jimmycai.com/v/zh-cn/)
|
[Documentation](https://docs.stack.jimmycai.com/) | [中文文档](https://docs.stack.jimmycai.com/zh/)
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
@@ -31,18 +31,13 @@ Stack is a simple card-style Hugo theme designed for bloggers, some of its featu
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
It's necessary to use **Hugo ≥ 0.78.0**.
|
It's necessary to use **Hugo Extended ≥ 0.78.0**.
|
||||||
|
|
||||||
Use Hugo Extended version (recommended) if you want to:
|
|
||||||
|
|
||||||
* Use the latest feature/fix from `master` branch
|
|
||||||
* Edit SCSS files
|
|
||||||
|
|
||||||
**Compiled CSS are updated once per release.**
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Clone / Download this repository to `theme` folder, and edit your site config following `exampleSite/config.toml`.
|
Clone / Download this repository to `theme` folder, and edit your site config following `exampleSite/config.yaml`.
|
||||||
|
|
||||||
|
*Note: Remove `config.toml` if there is one in the site folder.*
|
||||||
|
|
||||||
Check [documentation](https://docs.stack.jimmycai.com/) for more details.
|
Check [documentation](https://docs.stack.jimmycai.com/) for more details.
|
||||||
|
|
||||||
@@ -64,13 +59,22 @@ Your support is greatly appreciated :)
|
|||||||
|
|
||||||
## Thanks to
|
## Thanks to
|
||||||
|
|
||||||
- [Vibrant-Colors/node-vibrant](https://github.com/Vibrant-Colors/node-vibrant)
|
| Project | Description | Licence |
|
||||||
- [Normalize.css](https://necolas.github.io/normalize.css/)
|
| ------- | ----------- | ------- |
|
||||||
- [Tabler icons](https://tablericons.com/)
|
| [PhotoSwipe](https://photoswipe.com/) | For the lightbox effect | [MIT](https://github.com/dimsemenov/PhotoSwipe/blob/master/LICENSE) |
|
||||||
- [Pure CSS implementation of Google Photos / 500px image layout](https://github.com/xieranmaya/blog/issues/6)
|
| [Normalize.css](https://github.com/necolas/normalize.css) | - | [MIT](https://github.com/necolas/normalize.css/blob/master/LICENSE.md) |
|
||||||
- [jonsuh/hamburgers](https://github.com/jonsuh/hamburgers)
|
| [Node Vibrant](https://github.com/Vibrant-Colors/node-vibrant) | To extract the color from images | [MIT](https://github.com/Vibrant-Colors/node-vibrant/blob/master/LICENSE.md)
|
||||||
- [PhotoSwipe](https://photoswipe.com/)
|
| [Tabler icons](https://github.com/tabler/tabler-icons) | Default menu icons | [MIT](https://github.com/tabler/tabler-icons/blob/master/LICENSE) |
|
||||||
- [artchen/hexo-theme-element](https://github.com/artchen/hexo-theme-element)
|
| [jonsuh/hamburgers](https://github.com/jonsuh/hamburgers) | Hamburger icon of menu | [MIT](https://github.com/jonsuh/hamburgers/blob/master/LICENSE) |
|
||||||
- [MunifTanjim/minimo](https://github.com/MunifTanjim/minimo)
|
| [lepture/yue.css](https://github.com/lepture/yue.css) | Part of it is used for styling article content | MIT |
|
||||||
- [lepture/yue.css](https://github.com/lepture/yue.css)
|
| [Typlog](https://typlog.com/) | Where the markdown gallery syntax is borrowed from | The author gave me the permission |
|
||||||
- Markdown gallery syntax from [Typlog](https://typlog.com/)
|
| [Pure CSS implementation of Google Photos / 500px image layout](https://github.com/xieranmaya/blog/issues/6) | Used for image gallery | - |
|
||||||
|
|
||||||
|
### References
|
||||||
|
|
||||||
|
Some references that I took while building this theme:
|
||||||
|
|
||||||
|
| Project | Licence|
|
||||||
|
| ------- | ------|
|
||||||
|
| [artchen/hexo-theme-element](https://github.com/artchen/hexo-theme-element) | [MIT](https://github.com/artchen/hexo-theme-element/blob/master/LICENSE) |
|
||||||
|
| [MunifTanjim/minimo](https://github.com/MunifTanjim/minimo) | [MIT](https://github.com/MunifTanjim/minimo/blob/master/LICENSE) |
|
||||||
@@ -110,6 +110,7 @@
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,17 +127,17 @@
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 0;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
|
|
||||||
background-color: var(--card-background);
|
background-color: var(--card-background);
|
||||||
margin-top: 0;
|
|
||||||
padding: 15px 0;
|
padding: 15px 0;
|
||||||
box-shadow: var(--shadow-l1);
|
box-shadow: var(--shadow-l1);
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
|
margin: 0 -15px;
|
||||||
|
|
||||||
&.show {
|
&.show {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@@ -148,6 +148,7 @@
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
margin: 0;
|
||||||
margin-top: var(--sidebar-element-separation);
|
margin-top: var(--sidebar-element-separation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class StackColorScheme {
|
|||||||
localStorage.setItem(this.localStorageKey, this.currentScheme);
|
localStorage.setItem(this.localStorageKey, this.currentScheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bindClick(toggleEl) {
|
private bindClick(toggleEl: HTMLElement) {
|
||||||
toggleEl.addEventListener('click', (e) => {
|
toggleEl.addEventListener('click', (e) => {
|
||||||
if (this.isDark()) {
|
if (this.isDark()) {
|
||||||
/// Disable dark mode
|
/// Disable dark mode
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ params:
|
|||||||
repo:
|
repo:
|
||||||
clientId:
|
clientId:
|
||||||
clientSecret:
|
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.html
|
||||||
waline:
|
waline:
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
> Original Repo: https://github.com/cdeleeuwe/netlify-plugin-hugo-cache-resources
|
|
||||||
>
|
|
||||||
# Netlify Build Plugin: Persist Hugo resources Between Builds
|
|
||||||
|
|
||||||
Persist [Hugo](https://gohugo.io/) resources folder between Netlify builds for huge build speed improvements! ⚡️
|
|
||||||
|
|
||||||
This plugin caches the `resources` folder after build. If you are processing many images, this would improve build duration significantly.
|
|
||||||
|
|
||||||
Note: Restoring cache only comes from the production branch. So once cache is saved on the production branch, the next preview build would use the cache. For example, when pushing to the same preview build, the latest preview build will not get the cache from the previous preview build, but will get it from master.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
To install, add the following lines to your `netlify.toml` file:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
[build]
|
|
||||||
publish = "public"
|
|
||||||
|
|
||||||
[[plugins]]
|
|
||||||
package = "netlify-plugin-hugo-cache-resources"
|
|
||||||
|
|
||||||
[plugins.inputs]
|
|
||||||
# If it should show more verbose logs (optional, default = true)
|
|
||||||
debug = true
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: The `[[plugins]]` line is required for each plugin, even if you have other plugins in your `netlify.toml` file already.
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
const getResourcesDir = () => {
|
|
||||||
return 'exampleSite/resources';
|
|
||||||
}
|
|
||||||
|
|
||||||
const printList = (items) => {
|
|
||||||
console.log('---');
|
|
||||||
items.forEach((item, index) => {
|
|
||||||
console.log(`${index + 1}. ${item}`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
|
|
||||||
async onPreBuild({ utils, inputs }) {
|
|
||||||
const path = getResourcesDir();
|
|
||||||
const success = await utils.cache.restore(path);
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
const cachedFiles = await utils.cache.list(path);
|
|
||||||
console.log(`Restored cached resources folder. Total files: ${cachedFiles.length}`);
|
|
||||||
if (inputs.debug) printList(cachedFiles);
|
|
||||||
} else {
|
|
||||||
console.log(`No cache found for resources folder`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
async onPostBuild({ utils, inputs }) {
|
|
||||||
const path = getResourcesDir();
|
|
||||||
const success = await utils.cache.save(path);
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
const cachedFiles = await utils.cache.list(path);
|
|
||||||
console.log(`Saved resources folder to cache. Total files: ${cachedFiles.length}`);
|
|
||||||
if (inputs.debug) printList(cachedFiles);
|
|
||||||
} else {
|
|
||||||
console.log(`No resources folder cached`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
name: netlify-plugin-hugo-cache
|
|
||||||
inputs:
|
|
||||||
- name: debug
|
|
||||||
description: Show more verbose logs
|
|
||||||
default: true
|
|
||||||
@@ -1,9 +1,31 @@
|
|||||||
toggleMenu:
|
toggleMenu:
|
||||||
other: Afficher le menu
|
other: Afficher le menu
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Mode sombre
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} page"
|
||||||
|
other: "{{ .Count }} pages"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Section
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Sous-section
|
||||||
|
other: Sous-sections
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: Retour
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Table des matières
|
||||||
|
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: Contenus liés
|
other: Contenus liés
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: Dernière mise à jour le
|
other: Dernière mise à jour le
|
||||||
|
|
||||||
@@ -17,8 +39,10 @@ widget:
|
|||||||
archives:
|
archives:
|
||||||
title:
|
title:
|
||||||
other: Archives
|
other: Archives
|
||||||
|
|
||||||
more:
|
more:
|
||||||
other: Autres
|
other: Autres
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Mots clés
|
other: Mots clés
|
||||||
@@ -26,13 +50,16 @@ widget:
|
|||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
other: Rechercher
|
other: Rechercher
|
||||||
|
|
||||||
placeholder:
|
placeholder:
|
||||||
other: Cherchez un article, une publication, etc.
|
other: Cherchez un article, une publication, etc.
|
||||||
|
|
||||||
resultTitle:
|
resultTitle:
|
||||||
other: "#PAGES_COUNT pages (#TIME_SECONDS secondes)"
|
other: "#PAGES_COUNT pages (#TIME_SECONDS secondes)"
|
||||||
|
|
||||||
footer:
|
footer:
|
||||||
builtWith:
|
builtWith:
|
||||||
other: Généré avec {{ .Generator }}
|
other: Généré avec {{ .Generator }}
|
||||||
|
|
||||||
designedBy:
|
designedBy:
|
||||||
other: Thème {{ .Theme }} conçu par {{ .DesignedBy }}
|
other: Thème {{ .Theme }} conçu par {{ .DesignedBy }}
|
||||||
|
|||||||
@@ -5,8 +5,15 @@ darkMode:
|
|||||||
other: ダークモード
|
other: ダークモード
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: 前のページ
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: 目次
|
||||||
|
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: 関連するコンテンツ
|
other: 関連するコンテンツ
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: 最終更新
|
other: 最終更新
|
||||||
|
|
||||||
@@ -20,8 +27,10 @@ widget:
|
|||||||
archives:
|
archives:
|
||||||
title:
|
title:
|
||||||
other: アーカイブ
|
other: アーカイブ
|
||||||
|
|
||||||
more:
|
more:
|
||||||
other: さらに見る
|
other: さらに見る
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: タグ
|
other: タグ
|
||||||
@@ -29,7 +38,9 @@ widget:
|
|||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
other: 検索
|
other: 検索
|
||||||
|
|
||||||
placeholder:
|
placeholder:
|
||||||
other: 入力...
|
other: 入力...
|
||||||
|
|
||||||
resultTitle:
|
resultTitle:
|
||||||
other: "#PAGES_COUNT 件 (#TIME_SECONDS 秒)"
|
other: "#PAGES_COUNT 件 (#TIME_SECONDS 秒)"
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Przełącz Menu
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Tryb ciemny
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} strona"
|
||||||
|
other: "{{ .Count }} stron"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Sekcja
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Podsekcja
|
||||||
|
other: Podsekcje
|
||||||
|
|
||||||
|
article:
|
||||||
|
back:
|
||||||
|
other: Wróć
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Spis treści
|
||||||
|
|
||||||
|
relatedContents:
|
||||||
|
other: Powiązane artykuły
|
||||||
|
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Ostatnio zaktualizowany
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Nie znaleziono
|
||||||
|
subtitle:
|
||||||
|
other: Ta strona nie istnieje
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Archiwum
|
||||||
|
|
||||||
|
more:
|
||||||
|
other: Więcej
|
||||||
|
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Tagi
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Szukaj
|
||||||
|
|
||||||
|
placeholder:
|
||||||
|
other: Wpisz coś...
|
||||||
|
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT stron (#TIME_SECONDS sekund)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Zbudowano z {{ .Generator }}
|
||||||
|
|
||||||
|
designedBy:
|
||||||
|
other: Motyw {{ .Theme }} zaprojektowany przez {{ .DesignedBy }}
|
||||||
@@ -5,8 +5,15 @@ darkMode:
|
|||||||
other: 暗色模式
|
other: 暗色模式
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: 返回
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: 目录
|
||||||
|
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: 相关文章
|
other: 相关文章
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: 最后更新于
|
other: 最后更新于
|
||||||
|
|
||||||
@@ -20,8 +27,10 @@ widget:
|
|||||||
archives:
|
archives:
|
||||||
title:
|
title:
|
||||||
other: 归档
|
other: 归档
|
||||||
|
|
||||||
more:
|
more:
|
||||||
other: 更多
|
other: 更多
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: 标签云
|
other: 标签云
|
||||||
@@ -29,7 +38,9 @@ widget:
|
|||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
other: 搜索
|
other: 搜索
|
||||||
|
|
||||||
placeholder:
|
placeholder:
|
||||||
other: 输入关键词...
|
other: 输入关键词...
|
||||||
|
|
||||||
resultTitle:
|
resultTitle:
|
||||||
other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)"
|
other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
props: {
|
props: {
|
||||||
title: "{{ $.Title }}",
|
title: "{{ $.Title }}",
|
||||||
options: {
|
options: {
|
||||||
proxy: (url) => "https://cors-anywhere.azm.workers.dev/" + url,
|
autoCreateIssue: {{ default false .autoCreateIssue }},
|
||||||
owner: "{{ .owner }}",
|
owner: "{{ .owner }}",
|
||||||
repo: "{{ .repo }}",
|
repo: "{{ .repo }}",
|
||||||
clientId: "{{ .clientId }}",
|
clientId: "{{ .clientId }}",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- $ThemeVersion := "2.4.0" -}}
|
{{- $ThemeVersion := "2.5.0" -}}
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<section class="copyright">
|
<section class="copyright">
|
||||||
©
|
©
|
||||||
|
|||||||
+8
-2
@@ -2,7 +2,7 @@
|
|||||||
publish = "exampleSite/public"
|
publish = "exampleSite/public"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.79.0"
|
HUGO_VERSION = "0.85.0"
|
||||||
HUGO_THEME = "repo"
|
HUGO_THEME = "repo"
|
||||||
|
|
||||||
[context.production]
|
[context.production]
|
||||||
@@ -17,4 +17,10 @@
|
|||||||
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}"
|
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}"
|
||||||
|
|
||||||
[[plugins]]
|
[[plugins]]
|
||||||
package = "/exampleSite/plugins/netlify-plugin-hugo-cache-resources"
|
package = "netlify-plugin-hugo-cache-resources"
|
||||||
|
|
||||||
|
[plugins.inputs]
|
||||||
|
# If it should show more verbose logs (optional, default = true)
|
||||||
|
debug = true
|
||||||
|
# Relative path to source directory in case you use Hugo's "--s" option
|
||||||
|
srcdir = "exampleSite"
|
||||||
File diff suppressed because one or more lines are too long
+12
-12
@@ -5,23 +5,23 @@ name = "Stack"
|
|||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
|
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
|
||||||
description = "Card-style Hugo theme designed for bloggers"
|
description = "Card-style Hugo theme designed for bloggers"
|
||||||
homepage = "https://theme-stack.jimmycai.com"
|
homepage = "https://github.com/CaiJimmy/hugo-theme-stack"
|
||||||
tags = [
|
demosite = "https://theme-stack.jimmycai.com"
|
||||||
"blog",
|
|
||||||
"responsive",
|
tags = ["blog", "responsive", "clean", "light", "dark", "personal"]
|
||||||
"clean",
|
|
||||||
"light",
|
|
||||||
"dark",
|
|
||||||
"personal"
|
|
||||||
]
|
|
||||||
features = [
|
features = [
|
||||||
"disqus",
|
"disqus",
|
||||||
"photoswipe",
|
"photoswipe",
|
||||||
"opengraph",
|
"opengraph",
|
||||||
"widgets"
|
"widgets",
|
||||||
|
"darkmode",
|
||||||
|
"table of contents",
|
||||||
|
"search",
|
||||||
]
|
]
|
||||||
|
|
||||||
min_version = "0.78.0"
|
min_version = "0.78.0"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Jimmy Cai"
|
name = "Jimmy Cai"
|
||||||
homepage = "https://jimmycai.com"
|
homepage = "https://jimmycai.com"
|
||||||
|
|||||||
Reference in New Issue
Block a user