mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 12:03:31 +08:00
Merge branch 'master' into master
This commit is contained in:
commit
b182e9e3a5
31
.devcontainer/Dockerfile
Normal file
31
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,31 @@
|
||||
# Update the NODE_VERSION arg in docker-compose.yml to pick a Node version: 10, 12, 14
|
||||
ARG NODE_VERSION=14
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${NODE_VERSION}
|
||||
|
||||
# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
|
||||
ARG VARIANT=hugo
|
||||
# VERSION can be either 'latest' or a specific version number
|
||||
ARG VERSION=latest
|
||||
|
||||
# Download Hugo
|
||||
RUN apt-get update && apt-get install -y ca-certificates openssl git curl && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
case ${VERSION} in \
|
||||
latest) \
|
||||
export VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') ;;\
|
||||
esac && \
|
||||
echo ${VERSION} && \
|
||||
wget -O ${VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${VARIANT}_${VERSION}_Linux-64bit.tar.gz && \
|
||||
tar xf ${VERSION}.tar.gz && \
|
||||
mv hugo /usr/bin/hugo
|
||||
|
||||
# Hugo dev server port
|
||||
EXPOSE 1313
|
||||
|
||||
# [Optional] Uncomment this section to install additional OS packages you may want.
|
||||
#
|
||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
||||
|
||||
# [Optional] Uncomment if you want to install more global node packages
|
||||
# RUN sudo -u node npm install -g <your-package-list-here>
|
45
.devcontainer/devcontainer.json
Normal file
45
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,45 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.202.3/containers/hugo
|
||||
{
|
||||
"name": "Hugo (Community)",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": {
|
||||
// Update VARIANT to pick hugo variant.
|
||||
// Example variants: hugo, hugo_extended
|
||||
// Rebuild the container if it already exists to update.
|
||||
"VARIANT": "hugo_extended",
|
||||
// Update VERSION to pick a specific hugo version.
|
||||
// Example versions: latest, 0.73.0, 0,71.1
|
||||
// Rebuild the container if it already exists to update.
|
||||
"VERSION": "latest",
|
||||
// Update NODE_VERSION to pick the Node.js version: 12, 14
|
||||
"NODE_VERSION": "14",
|
||||
}
|
||||
},
|
||||
|
||||
// Set *default* container specific settings.json values on container create.
|
||||
"settings": {
|
||||
"html.format.templating": true,
|
||||
},
|
||||
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"bungcip.better-toml",
|
||||
"davidanson.vscode-markdownlint"
|
||||
],
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
"forwardPorts": [
|
||||
1313
|
||||
],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "uname -a",
|
||||
|
||||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||
"remoteUser": "node",
|
||||
"features": {
|
||||
"golang": "latest"
|
||||
}
|
||||
}
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
public
|
||||
resources
|
||||
assets/jsconfig.json
|
6
assets/icons/brand-github.svg
Normal file
6
assets/icons/brand-github.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" />
|
||||
</svg>
|
||||
|
||||
|
After Width: | Height: | Size: 603 B |
6
assets/icons/brand-twitter.svg
Normal file
6
assets/icons/brand-twitter.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-twitter" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z" />
|
||||
</svg>
|
||||
|
||||
|
After Width: | Height: | Size: 638 B |
@ -201,3 +201,18 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.social-menu {
|
||||
list-style: none;
|
||||
padding: 0%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 10px;
|
||||
|
||||
svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
stroke: var(--body-text-color);
|
||||
stroke-width: 1.33;
|
||||
}
|
||||
}
|
||||
|
147
config.yaml
Normal file
147
config.yaml
Normal file
@ -0,0 +1,147 @@
|
||||
module:
|
||||
hugoVersion:
|
||||
extended: true
|
||||
min: "0.87.0"
|
||||
|
||||
params:
|
||||
mainSections:
|
||||
- post
|
||||
featuredImageField: image
|
||||
rssFullContent: true
|
||||
favicon:
|
||||
|
||||
footer:
|
||||
since:
|
||||
customText:
|
||||
|
||||
dateFormat:
|
||||
published: Jan 02, 2006
|
||||
lastUpdated: Jan 02, 2006 15:04 MST
|
||||
|
||||
sidebar:
|
||||
emoji:
|
||||
subtitle:
|
||||
avatar:
|
||||
enabled: true
|
||||
local: true
|
||||
src: img/avatar.png
|
||||
|
||||
article:
|
||||
math: false
|
||||
toc: true
|
||||
readingTime: true
|
||||
license:
|
||||
enabled: false
|
||||
default: Licensed under CC BY-NC-SA 4.0
|
||||
|
||||
comments:
|
||||
enabled: false
|
||||
provider: disqus
|
||||
|
||||
disqusjs:
|
||||
shortname:
|
||||
apiUrl:
|
||||
apiKey:
|
||||
admin:
|
||||
adminLabel:
|
||||
|
||||
utterances:
|
||||
repo:
|
||||
issueTerm: pathname
|
||||
label:
|
||||
|
||||
remark42:
|
||||
host:
|
||||
site:
|
||||
locale:
|
||||
|
||||
vssue:
|
||||
platform:
|
||||
owner:
|
||||
repo:
|
||||
clientId:
|
||||
clientSecret:
|
||||
autoCreateIssue: false
|
||||
|
||||
# Waline client configuration see: https://waline.js.org/en/reference/client.html
|
||||
waline:
|
||||
serverURL:
|
||||
lang:
|
||||
visitor:
|
||||
avatar:
|
||||
emoji:
|
||||
- https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo
|
||||
requiredMeta:
|
||||
- name
|
||||
- email
|
||||
- url
|
||||
placeholder:
|
||||
locale:
|
||||
admin: Admin
|
||||
|
||||
twikoo:
|
||||
envId:
|
||||
region:
|
||||
path:
|
||||
lang:
|
||||
|
||||
giscus:
|
||||
repo:
|
||||
repoID:
|
||||
category:
|
||||
categoryID:
|
||||
mapping:
|
||||
lightTheme:
|
||||
darkTheme:
|
||||
reactionsEnabled: 1
|
||||
emitMetadata: 0
|
||||
|
||||
gitalk:
|
||||
owner:
|
||||
admin:
|
||||
repo:
|
||||
clientID:
|
||||
clientSecret:
|
||||
|
||||
cusdis:
|
||||
host:
|
||||
id:
|
||||
|
||||
widgets:
|
||||
enabled:
|
||||
- search
|
||||
- archives
|
||||
- tag-cloud
|
||||
|
||||
archives:
|
||||
limit: 5
|
||||
|
||||
tagCloud:
|
||||
limit: 10
|
||||
|
||||
opengraph:
|
||||
twitter:
|
||||
# Your Twitter username
|
||||
site:
|
||||
|
||||
# Available values: summary, summary_large_image
|
||||
card: summary_large_image
|
||||
|
||||
defaultImage:
|
||||
opengraph:
|
||||
enabled: false
|
||||
local: false
|
||||
src:
|
||||
|
||||
colorScheme:
|
||||
# Display toggle
|
||||
toggle: true
|
||||
|
||||
# Available values: auto, light, dark
|
||||
default: auto
|
||||
|
||||
imageProcessing:
|
||||
cover:
|
||||
enabled: true
|
||||
content:
|
||||
enabled: true
|
1
debug.sh
Executable file
1
debug.sh
Executable file
@ -0,0 +1 @@
|
||||
cd exampleSite && hugo server --gc --themesDir=../..
|
@ -11,7 +11,7 @@ disqusShortname: hugo-theme-stack
|
||||
googleAnalytics:
|
||||
|
||||
# Theme i18n support
|
||||
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl, it
|
||||
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl, it, th, el
|
||||
DefaultContentLanguage: en
|
||||
|
||||
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
|
||||
@ -174,10 +174,23 @@ menu:
|
||||
name: Home
|
||||
url: /
|
||||
weight: -100
|
||||
pre: home
|
||||
params:
|
||||
### For demonstration purpose, the home link will be open in a new tab
|
||||
newTab: true
|
||||
icon: home
|
||||
|
||||
social:
|
||||
- identifier: github
|
||||
name: GitHub
|
||||
url: https://github.com/CaiJimmy/hugo-theme-stack
|
||||
params:
|
||||
icon: brand-github
|
||||
|
||||
- identifier: twitter
|
||||
name: Twitter
|
||||
url: https://twitter.com
|
||||
params:
|
||||
icon: brand-twitter
|
||||
|
||||
related:
|
||||
includeNewer: true
|
||||
|
@ -11,7 +11,8 @@ lastmod: '2020-10-09'
|
||||
menu:
|
||||
main:
|
||||
weight: -90
|
||||
pre: user
|
||||
params:
|
||||
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.
|
||||
|
@ -6,5 +6,6 @@ slug: "archives"
|
||||
menu:
|
||||
main:
|
||||
weight: -70
|
||||
pre: archives
|
||||
params:
|
||||
icon: archives
|
||||
---
|
||||
|
@ -8,5 +8,6 @@ outputs:
|
||||
menu:
|
||||
main:
|
||||
weight: -60
|
||||
pre: search
|
||||
params:
|
||||
icon: search
|
||||
---
|
70
i18n/el.yaml
Normal file
70
i18n/el.yaml
Normal file
@ -0,0 +1,70 @@
|
||||
toggleMenu:
|
||||
other: Εναλλαγή Μενού
|
||||
|
||||
darkMode:
|
||||
other: Σκοτεινό θέμα
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} σελιδα"
|
||||
other: "{{ .Count }} σελιδες"
|
||||
|
||||
section:
|
||||
other: Ενότητα
|
||||
|
||||
subsection:
|
||||
one: Υποενότητα
|
||||
other: Υποενότητες
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Πισω
|
||||
|
||||
tableOfContents:
|
||||
other: Πινακας περιεχομενων
|
||||
|
||||
relatedContents:
|
||||
other: Σχετικο περιεχομενο
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Τελευταια τροποποιηση στις
|
||||
|
||||
readingTime:
|
||||
one: "{{ .Count }} λεπτό ανάγνωσης"
|
||||
### Seems that there's no need to add 's' even if it's plural in English
|
||||
other: "{{ .Count }} λεπτά ανάγνωσης"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Δε βρέθηκε
|
||||
subtitle:
|
||||
other: Η σελίδα δε βρέθηκε.
|
||||
|
||||
widget:
|
||||
archives:
|
||||
title:
|
||||
other: Αρχειο
|
||||
|
||||
more:
|
||||
other: Περισσότερα
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Tags
|
||||
|
||||
search:
|
||||
title:
|
||||
other: Αναζήτηση
|
||||
|
||||
placeholder:
|
||||
other: Πληκτρολογήστε κάτι...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT σελιδες (#TIME_SECONDS δευτερολεπτα)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Δημιουργήθηκε με τη χρήση {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: Το θέμα {{ .Theme }} σχεδιάστηκε από το {{ .DesignedBy }}
|
@ -17,11 +17,22 @@ list:
|
||||
other: Subseções
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Voltar
|
||||
|
||||
tableOfContents:
|
||||
other: Índice
|
||||
|
||||
relatedContents:
|
||||
other: Conteúdos Relacionados
|
||||
other: Conteúdo relacionado
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Última atualização em
|
||||
|
||||
readingTime:
|
||||
one: "{{ .Count }} minuto de leitura"
|
||||
other: "{{ .Count }} minutos de leitura"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Não Encontrado
|
||||
|
70
i18n/th.yaml
Normal file
70
i18n/th.yaml
Normal file
@ -0,0 +1,70 @@
|
||||
toggleMenu:
|
||||
other: สลับเมนู
|
||||
|
||||
darkMode:
|
||||
other: ธีมมืด
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} หน้า"
|
||||
other: "{{ .Count }} หน้า"
|
||||
|
||||
section:
|
||||
other: หมวดหมู่
|
||||
|
||||
subsection:
|
||||
one: หมวดหมู่ย่อย
|
||||
other: หมวดหมู่ย่อยอื่นๆ
|
||||
|
||||
article:
|
||||
back:
|
||||
other: กลับไป
|
||||
|
||||
tableOfContents:
|
||||
other: สารบัญ
|
||||
|
||||
relatedContents:
|
||||
other: เนื้อหาคล้ายคลึงกัน
|
||||
|
||||
lastUpdatedOn:
|
||||
other: อัปเดตล่าสุดเมื่อ
|
||||
|
||||
readingTime:
|
||||
one: "น่าจะใช้เวลา {{ .Count }} นาทีในการอ่าน"
|
||||
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 pages (#TIME_SECONDS seconds)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: ถูกสร้างด้วย {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: ธีม {{ .Theme }} ออกแบบโดย {{ .DesignedBy }}
|
@ -29,7 +29,7 @@
|
||||
{{ define "left-sidebar" }}
|
||||
{{ if (.Scratch.Get "hasTOC") }}
|
||||
<div id="article-toolbar">
|
||||
<a href="{{ .Site.BaseURL }}" class="back-home">
|
||||
<a href="{{ .Site.BaseURL | relLangURL }}" class="back-home">
|
||||
{{ (resources.Get "icons/back.svg").Content | safeHTML }}
|
||||
<span>{{ T "article.back" }}</span>
|
||||
</a>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- $ThemeVersion := "3.2.0" -}}
|
||||
{{- $ThemeVersion := "3.4.0" -}}
|
||||
<footer class="site-footer">
|
||||
<section class="copyright">
|
||||
©
|
||||
|
@ -29,8 +29,28 @@
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
||||
|
||||
<h1 class="site-name"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a></h1>
|
||||
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
||||
|
||||
{{- with .Site.Menus.social -}}
|
||||
<ol class="social-menu">
|
||||
{{ range . }}
|
||||
<li>
|
||||
<a
|
||||
href='{{ .URL | relLangURL }}'
|
||||
{{ if eq (default true .Params.newTab) true }}target="_blank"{{ end }}
|
||||
{{ with .Name }}title="{{ . }}"{{ end }}
|
||||
>
|
||||
{{ $icon := default "link" .Params.Icon }}
|
||||
{{ with $icon }}
|
||||
{{ partial "helper/icon" . }}
|
||||
{{ end }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
{{- end -}}
|
||||
</header>
|
||||
|
||||
<ol class="menu" id="main-menu">
|
||||
@ -39,9 +59,13 @@
|
||||
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
||||
|
||||
<li {{ if $active }} class='current' {{ end }}>
|
||||
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
||||
<a href='{{ .URL | relLangURL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
||||
{{ $icon := default .Pre .Params.Icon }}
|
||||
{{ if .Pre }}
|
||||
{{ partial "helper/icon" .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 }}
|
||||
{{ end }}
|
||||
{{ with $icon }}
|
||||
{{ partial "helper/icon" . }}
|
||||
{{ end }}
|
||||
<span>{{- .Name -}}</span>
|
||||
</a>
|
||||
|
@ -20,7 +20,7 @@ features = [
|
||||
"search",
|
||||
]
|
||||
|
||||
min_version = "0.78.0"
|
||||
min_version = "0.87.0"
|
||||
|
||||
[author]
|
||||
name = "Jimmy Cai"
|
||||
|
Loading…
Reference in New Issue
Block a user