Compare commits

..
8 Commits
Author SHA1 Message Date
Jimmy Cai 230468d613 ci: remove exampleSite/plugins 2021-07-09 13:23:18 +02:00
Jimmy Cai 0afa502cdd Revert "ci: update srcdir of netlify-plugin-hugo-cache-resources"
This reverts commit 90e7761967.
2021-07-09 13:21:46 +02:00
Jimmy Cai 90e7761967 ci: update srcdir of netlify-plugin-hugo-cache-resources 2021-07-09 13:18:49 +02:00
Jimmy Cai 5d1a7b8768 ci: upgrade hugo version to 0.85.0
Use official version of plugin `netlify-plugin-hugo-cache-resources`
2021-07-09 13:12:03 +02:00
Jimmy Cai 28ab0dd980 doc: update README to include license information 2021-07-09 13:04:30 +02:00
Jimmy Cai 1857909fe4 fix(menu): remove horizontal menu margin on mobile 2021-07-09 12:20:13 +02:00
慕枫GoandGitHub b7d4048298 feat(comment/vssue): add parameter 'autoCreateIssue' (#258)
It's default false
2021-07-07 13:18:05 +02:00
ZoroarkandGitHub 45a944412c feat(i18n): Added missing French translations (#259)
Also adds whitespace to match the English file's layout.
2021-07-07 13:05:30 +02:00
9 changed files with 64 additions and 96 deletions
+24 -20
View File
@@ -9,7 +9,7 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/a2d2807a-a905-4bcb-97da-8da8d847da3d/deploy-status)](https://app.netlify.com/sites/hugo-theme-stack/deploys) [![Netlify Status](https://api.netlify.com/api/v1/badges/a2d2807a-a905-4bcb-97da-8da8d847da3d/deploy-status)](https://app.netlify.com/sites/hugo-theme-stack/deploys)
## Documentation & more information ## Documentation
[Documentation](https://docs.stack.jimmycai.com/) | [中文文档](https://docs.stack.jimmycai.com/zh/) [Documentation](https://docs.stack.jimmycai.com/) | [中文文档](https://docs.stack.jimmycai.com/zh/)
@@ -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) |
+3 -2
View File
@@ -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);
} }
+1
View File
@@ -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
+27
View File
@@ -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 }}
@@ -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 }}",
+8 -2
View File
@@ -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"