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)
|
||||
|
||||
## 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
|
||||
|
||||
@@ -31,18 +31,13 @@ Stack is a simple card-style Hugo theme designed for bloggers, some of its featu
|
||||
|
||||
## Requirements
|
||||
|
||||
It's necessary to use **Hugo ≥ 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.**
|
||||
It's necessary to use **Hugo Extended ≥ 0.78.0**.
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -64,13 +59,22 @@ Your support is greatly appreciated :)
|
||||
|
||||
## Thanks to
|
||||
|
||||
- [Vibrant-Colors/node-vibrant](https://github.com/Vibrant-Colors/node-vibrant)
|
||||
- [Normalize.css](https://necolas.github.io/normalize.css/)
|
||||
- [Tabler icons](https://tablericons.com/)
|
||||
- [Pure CSS implementation of Google Photos / 500px image layout](https://github.com/xieranmaya/blog/issues/6)
|
||||
- [jonsuh/hamburgers](https://github.com/jonsuh/hamburgers)
|
||||
- [PhotoSwipe](https://photoswipe.com/)
|
||||
- [artchen/hexo-theme-element](https://github.com/artchen/hexo-theme-element)
|
||||
- [MunifTanjim/minimo](https://github.com/MunifTanjim/minimo)
|
||||
- [lepture/yue.css](https://github.com/lepture/yue.css)
|
||||
- Markdown gallery syntax from [Typlog](https://typlog.com/)
|
||||
| Project | Description | Licence |
|
||||
| ------- | ----------- | ------- |
|
||||
| [PhotoSwipe](https://photoswipe.com/) | For the lightbox effect | [MIT](https://github.com/dimsemenov/PhotoSwipe/blob/master/LICENSE) |
|
||||
| [Normalize.css](https://github.com/necolas/normalize.css) | - | [MIT](https://github.com/necolas/normalize.css/blob/master/LICENSE.md) |
|
||||
| [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)
|
||||
| [Tabler icons](https://github.com/tabler/tabler-icons) | Default menu icons | [MIT](https://github.com/tabler/tabler-icons/blob/master/LICENSE) |
|
||||
| [jonsuh/hamburgers](https://github.com/jonsuh/hamburgers) | Hamburger icon of menu | [MIT](https://github.com/jonsuh/hamburgers/blob/master/LICENSE) |
|
||||
| [lepture/yue.css](https://github.com/lepture/yue.css) | Part of it is used for styling article content | MIT |
|
||||
| [Typlog](https://typlog.com/) | Where the markdown gallery syntax is borrowed from | The author gave me the permission |
|
||||
| [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 {
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,17 +127,17 @@
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 0;
|
||||
overflow-y: auto;
|
||||
flex-grow: 1;
|
||||
font-size: 1.4rem;
|
||||
|
||||
background-color: var(--card-background);
|
||||
margin-top: 0;
|
||||
padding: 15px 0;
|
||||
box-shadow: var(--shadow-l1);
|
||||
display: none;
|
||||
|
||||
margin: 0 -15px;
|
||||
|
||||
&.show {
|
||||
display: block;
|
||||
}
|
||||
@@ -148,6 +148,7 @@
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
margin: 0;
|
||||
margin-top: var(--sidebar-element-separation);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class StackColorScheme {
|
||||
localStorage.setItem(this.localStorageKey, this.currentScheme);
|
||||
}
|
||||
|
||||
private bindClick(toggleEl) {
|
||||
private bindClick(toggleEl: HTMLElement) {
|
||||
toggleEl.addEventListener('click', (e) => {
|
||||
if (this.isDark()) {
|
||||
/// Disable dark mode
|
||||
|
||||
@@ -67,6 +67,7 @@ params:
|
||||
repo:
|
||||
clientId:
|
||||
clientSecret:
|
||||
autoCreateIssue: false
|
||||
|
||||
# Waline client configuration see: https://waline.js.org/en/reference/client.html
|
||||
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:
|
||||
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:
|
||||
back:
|
||||
other: Retour
|
||||
|
||||
tableOfContents:
|
||||
other: Table des matières
|
||||
|
||||
relatedContents:
|
||||
other: Contenus liés
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Dernière mise à jour le
|
||||
|
||||
@@ -17,8 +39,10 @@ widget:
|
||||
archives:
|
||||
title:
|
||||
other: Archives
|
||||
|
||||
more:
|
||||
other: Autres
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Mots clés
|
||||
@@ -26,13 +50,16 @@ widget:
|
||||
search:
|
||||
title:
|
||||
other: Rechercher
|
||||
|
||||
placeholder:
|
||||
other: Cherchez un article, une publication, etc.
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT pages (#TIME_SECONDS secondes)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Généré avec {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: Thème {{ .Theme }} conçu par {{ .DesignedBy }}
|
||||
|
||||
@@ -5,8 +5,15 @@ darkMode:
|
||||
other: ダークモード
|
||||
|
||||
article:
|
||||
back:
|
||||
other: 前のページ
|
||||
|
||||
tableOfContents:
|
||||
other: 目次
|
||||
|
||||
relatedContents:
|
||||
other: 関連するコンテンツ
|
||||
|
||||
lastUpdatedOn:
|
||||
other: 最終更新
|
||||
|
||||
@@ -20,8 +27,10 @@ widget:
|
||||
archives:
|
||||
title:
|
||||
other: アーカイブ
|
||||
|
||||
more:
|
||||
other: さらに見る
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: タグ
|
||||
@@ -29,7 +38,9 @@ widget:
|
||||
search:
|
||||
title:
|
||||
other: 検索
|
||||
|
||||
placeholder:
|
||||
other: 入力...
|
||||
|
||||
resultTitle:
|
||||
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: 暗色模式
|
||||
|
||||
article:
|
||||
back:
|
||||
other: 返回
|
||||
|
||||
tableOfContents:
|
||||
other: 目录
|
||||
|
||||
relatedContents:
|
||||
other: 相关文章
|
||||
|
||||
lastUpdatedOn:
|
||||
other: 最后更新于
|
||||
|
||||
@@ -20,8 +27,10 @@ widget:
|
||||
archives:
|
||||
title:
|
||||
other: 归档
|
||||
|
||||
more:
|
||||
other: 更多
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: 标签云
|
||||
@@ -29,7 +38,9 @@ widget:
|
||||
search:
|
||||
title:
|
||||
other: 搜索
|
||||
|
||||
placeholder:
|
||||
other: 输入关键词...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
props: {
|
||||
title: "{{ $.Title }}",
|
||||
options: {
|
||||
proxy: (url) => "https://cors-anywhere.azm.workers.dev/" + url,
|
||||
autoCreateIssue: {{ default false .autoCreateIssue }},
|
||||
owner: "{{ .owner }}",
|
||||
repo: "{{ .repo }}",
|
||||
clientId: "{{ .clientId }}",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- $ThemeVersion := "2.4.0" -}}
|
||||
{{- $ThemeVersion := "2.5.0" -}}
|
||||
<footer class="site-footer">
|
||||
<section class="copyright">
|
||||
©
|
||||
|
||||
+8
-2
@@ -2,7 +2,7 @@
|
||||
publish = "exampleSite/public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.79.0"
|
||||
HUGO_VERSION = "0.85.0"
|
||||
HUGO_THEME = "repo"
|
||||
|
||||
[context.production]
|
||||
@@ -17,4 +17,10 @@
|
||||
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}"
|
||||
|
||||
[[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"
|
||||
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
|
||||
description = "Card-style Hugo theme designed for bloggers"
|
||||
homepage = "https://theme-stack.jimmycai.com"
|
||||
tags = [
|
||||
"blog",
|
||||
"responsive",
|
||||
"clean",
|
||||
"light",
|
||||
"dark",
|
||||
"personal"
|
||||
]
|
||||
homepage = "https://github.com/CaiJimmy/hugo-theme-stack"
|
||||
demosite = "https://theme-stack.jimmycai.com"
|
||||
|
||||
tags = ["blog", "responsive", "clean", "light", "dark", "personal"]
|
||||
|
||||
features = [
|
||||
"disqus",
|
||||
"photoswipe",
|
||||
"opengraph",
|
||||
"widgets"
|
||||
"widgets",
|
||||
"darkmode",
|
||||
"table of contents",
|
||||
"search",
|
||||
]
|
||||
|
||||
min_version = "0.78.0"
|
||||
|
||||
[author]
|
||||
name = "Jimmy Cai"
|
||||
homepage = "https://jimmycai.com"
|
||||
name = "Jimmy Cai"
|
||||
homepage = "https://jimmycai.com"
|
||||
|
||||
Reference in New Issue
Block a user