Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab17b22c77 | ||
|
|
9a4ee4fc33 | ||
|
|
0f33b3efb7 | ||
|
|
3a03d69502 | ||
|
|
3b753c9cc0 | ||
|
|
f646097afe | ||
|
|
258a71e21a | ||
|
|
a069e975aa | ||
|
|
211bf65153 | ||
|
|
0542fed42e | ||
|
|
b1c5986b2f | ||
|
|
fe7a0566df | ||
|
|
35cba14cde | ||
|
|
d002c0d0d9 | ||
|
|
ae0de75992 | ||
|
|
067bcdb370 | ||
|
|
b1ddad1d22 | ||
|
|
9d9ecc4d00 | ||
|
|
5f1ab2bc76 | ||
|
|
633c8c6b9f | ||
|
|
c872a77edb | ||
|
|
406fcef7cd | ||
|
|
ffab83a637 | ||
|
|
9add062300 | ||
|
|
12daa8c9fc | ||
|
|
f804db2c80 | ||
|
|
090378e4da | ||
|
|
d6ced60f51 | ||
|
|
dc36aa60a9 | ||
|
|
475d01b046 | ||
|
|
5a5876e3ea | ||
|
|
ba9a5caa16 | ||
|
|
47db505228 | ||
|
|
dc94a29617 | ||
|
|
7df31001af |
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# @file
|
||||
# Builds a Hugo site hosted on a Cloudflare Worker.
|
||||
#
|
||||
# The Cloudflare Worker automatically installs Node.js dependencies.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
main() {
|
||||
DART_SASS_VERSION=1.97.1
|
||||
GO_VERSION=1.25.5
|
||||
HUGO_VERSION=0.154.5
|
||||
NODE_VERSION=24.12.0
|
||||
|
||||
export TZ=Europe/Oslo
|
||||
|
||||
# Install Dart Sass
|
||||
echo "Installing Dart Sass ${DART_SASS_VERSION}..."
|
||||
curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
|
||||
tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
|
||||
rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
|
||||
export PATH="${HOME}/.local/dart-sass:${PATH}"
|
||||
|
||||
# Install Go
|
||||
echo "Installing Go ${GO_VERSION}..."
|
||||
curl -sLJO "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz"
|
||||
tar -C "${HOME}/.local" -xf "go${GO_VERSION}.linux-amd64.tar.gz"
|
||||
rm "go${GO_VERSION}.linux-amd64.tar.gz"
|
||||
export PATH="${HOME}/.local/go/bin:${PATH}"
|
||||
|
||||
# Install Hugo
|
||||
echo "Installing Hugo ${HUGO_VERSION}..."
|
||||
curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
||||
mkdir "${HOME}/.local/hugo"
|
||||
tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
||||
rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
||||
export PATH="${HOME}/.local/hugo:${PATH}"
|
||||
|
||||
# Install Node.js
|
||||
echo "Installing Node.js ${NODE_VERSION}..."
|
||||
curl -sLJO "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||
tar -C "${HOME}/.local" -xf "node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||
rm "node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||
export PATH="${HOME}/.local/node-v${NODE_VERSION}-linux-x64/bin:${PATH}"
|
||||
|
||||
# Verify installations
|
||||
echo "Verifying installations..."
|
||||
echo Dart Sass: "$(sass --version)"
|
||||
echo Go: "$(go version)"
|
||||
echo Hugo: "$(hugo version)"
|
||||
echo Node.js: "$(node --version)"
|
||||
|
||||
# Configure Git
|
||||
echo "Configuring Git..."
|
||||
git config core.quotepath false
|
||||
if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then
|
||||
git fetch --unshallow
|
||||
fi
|
||||
|
||||
# Build the site
|
||||
echo "Building the site..."
|
||||
cd demo
|
||||
hugo --gc --minify --themesDir=/opt/buildhome --theme=repo
|
||||
}
|
||||
|
||||
set -euo pipefail
|
||||
main "$@"
|
||||
@@ -1,56 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
|
||||
|
||||
ARG USER=vscode
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN usermod -s /usr/bin/zsh ${USER}
|
||||
|
||||
# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
|
||||
ARG VARIANT=hugo_extended
|
||||
# VERSION can be either 'latest' or a specific version number
|
||||
ARG VERSION=latest
|
||||
|
||||
# Download Hugo
|
||||
RUN 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} && \
|
||||
case $(uname -m) in \
|
||||
aarch64) \
|
||||
export ARCH=ARM64 ;; \
|
||||
*) \
|
||||
export ARCH=64bit ;; \
|
||||
esac && \
|
||||
echo ${ARCH} && \
|
||||
wget -O ${VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${VARIANT}_${VERSION}_Linux-${ARCH}.tar.gz && \
|
||||
tar xf ${VERSION}.tar.gz && \
|
||||
mv hugo /usr/bin/hugo
|
||||
|
||||
# Hugo dev server port
|
||||
EXPOSE 1313
|
||||
|
||||
|
||||
USER ${USER}
|
||||
ARG HOME=/home/${USER}
|
||||
WORKDIR ${HOME}
|
||||
|
||||
ARG PNPM_HOME=${HOME}/.local/share/pnpm
|
||||
ENV PATH="${PNPM_HOME}:$PATH"
|
||||
RUN <<EOT
|
||||
wget -qO- https://get.pnpm.io/install.sh | ENV="${HOME}/.zshrc" SHELL=/bin/zsh sh -
|
||||
pnpm env use -g lts
|
||||
EOT
|
||||
|
||||
ARG OHMYZSH_HOME=${HOME}/.oh-my-zsh
|
||||
|
||||
# ARG OHMYZSH_THEME=${OHMYZSH_HOME}/custom/themes
|
||||
# RUN <<EOT
|
||||
# git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${OHMYZSH_THEME}/powerlevel10k
|
||||
# sed -i 's|ZSH_THEME="devcontainers"|ZSH_THEME="powerlevel10k/powerlevel10k"|g' .zshrc
|
||||
# echo 'POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true' >> .zshrc
|
||||
# EOT
|
||||
|
||||
RUN <<EOT
|
||||
hugo completion zsh > ${OHMYZSH_HOME}/plugins/git/_hugo
|
||||
EOT
|
||||
@@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "Hugo & pnpm",
|
||||
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
|
||||
// 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features.
|
||||
// "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {} },
|
||||
|
||||
// 👇 Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
// Configure properties specific to VS Code.
|
||||
"vscode": {
|
||||
// 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": [
|
||||
// https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter
|
||||
"eliostruyf.vscode-front-matter",
|
||||
// https://marketplace.visualstudio.com/items?itemName=rusnasonov.vscode-hugo
|
||||
"rusnasonov.vscode-hugo",
|
||||
// https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode
|
||||
"budparr.language-hugo-vscode",
|
||||
// https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hugo-themer
|
||||
"eliostruyf.vscode-hugo-themer",
|
||||
// https://marketplace.visualstudio.com/items?itemName=kaellarkin.hugo-shortcode-syntax
|
||||
"kaellarkin.hugo-shortcode-syntax",
|
||||
|
||||
// "csstools.postcss",
|
||||
|
||||
// "esbenp.prettier-vscode",
|
||||
// "tamasfe.even-better-toml",
|
||||
// "naumovs.color-highlight",
|
||||
// "GitHub.vscode-pull-request-github",
|
||||
// "eamodio.gitlens",
|
||||
"davidanson.vscode-markdownlint",
|
||||
"streetsidesoftware.code-spell-checker"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"remoteUser": "vscode",
|
||||
|
||||
"postCreateCommand": "pnpm install-completion zsh"
|
||||
}
|
||||
@@ -12,8 +12,7 @@ Use this template: [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJim
|
||||
|
||||
## Demo
|
||||
|
||||
* Starter template demo: [demo.stack.jimmycai.com](https://demo.stack.jimmycai.com)
|
||||
* Dev build: [dev.stack.jimmycai.com](https://dev.stack.jimmycai.com)
|
||||
Check [demo.stack.jimmycai.com](https://demo.stack.jimmycai.com)
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-left"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>
|
||||
|
After Width: | Height: | Size: 336 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-right"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>
|
||||
|
After Width: | Height: | Size: 336 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-dots"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>
|
||||
|
After Width: | Height: | Size: 459 B |
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"*"
|
||||
]
|
||||
},
|
||||
"lib": ["es2020", "dom"],
|
||||
"jsx": "preserve"
|
||||
}
|
||||
}
|
||||
@@ -33,15 +33,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@for $i from 1 through length($defaultTagBackgrounds) {
|
||||
&:nth-child(#{length($defaultTagBackgrounds)}n + #{$i}) {
|
||||
.article-category a {
|
||||
background: nth($defaultTagBackgrounds, $i);
|
||||
color: nth($defaultTagColors, $i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +194,6 @@
|
||||
.article-preview {
|
||||
font-size: 1.4rem;
|
||||
color: var(--card-text-color-tertiary);
|
||||
margin-top: 10px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,90 +84,147 @@
|
||||
}
|
||||
}
|
||||
|
||||
.widget--toc {
|
||||
background-color: var(--card-background);
|
||||
border-radius: var(--card-border-radius);
|
||||
box-shadow: var(--shadow-l1);
|
||||
.toc-nav {
|
||||
overflow-x: auto;
|
||||
max-height: 75vh;
|
||||
|
||||
ol,
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ol {
|
||||
list-style-type: none;
|
||||
counter-reset: item;
|
||||
|
||||
li a:first-of-type::before {
|
||||
counter-increment: item;
|
||||
content: counters(item, ".") ". ";
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
&>ul {
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 15px 0 15px 20px;
|
||||
padding: 5px;
|
||||
|
||||
&>ol,
|
||||
&>ul {
|
||||
margin-top: 10px;
|
||||
padding-left: 10px;
|
||||
margin-bottom: -5px;
|
||||
|
||||
&>li:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
li.active-class>a {
|
||||
border-left: var(--heading-border-size) solid var(--accent-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul li.active-class>a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@function repeat($str, $n) {
|
||||
$result: "";
|
||||
|
||||
@for $_ from 0 to $n {
|
||||
$result: $result + $str;
|
||||
}
|
||||
|
||||
@return $result;
|
||||
}
|
||||
|
||||
// Support up to 6 levels of indentation for lists in ToCs
|
||||
@for $i from 0 to 5 {
|
||||
&>ul #{repeat("> li > ul", $i)}>li.active-class>a {
|
||||
$n: 25 + $i * 35;
|
||||
margin-left: calc(-#{$n}px - 1em);
|
||||
padding-left: calc(#{$n}px + 1em - var(--heading-border-size));
|
||||
}
|
||||
|
||||
&>ol #{repeat("> li > ol", $i)}>li.active-class>a {
|
||||
$n: 9 + $i * 35;
|
||||
margin-left: calc(-#{$n}px - 1em);
|
||||
padding-left: calc(#{$n}px + 1em - var(--heading-border-size));
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.widget--toc,
|
||||
.article-toc {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--card-text-color-main);
|
||||
overflow: hidden;
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: var(--card-separator-color);
|
||||
}
|
||||
}
|
||||
|
||||
#TableOfContents {
|
||||
overflow-x: auto;
|
||||
max-height: 75vh;
|
||||
.widget--toc {
|
||||
background-color: var(--card-background);
|
||||
border-radius: var(--card-border-radius);
|
||||
box-shadow: var(--shadow-l1);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.article-toc {
|
||||
padding: 0 var(--card-padding);
|
||||
margin-top: 20px;
|
||||
|
||||
ol {
|
||||
list-style-type: none;
|
||||
counter-reset: item;
|
||||
@include respond(lg) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
li a:first-of-type::before {
|
||||
counter-increment: item;
|
||||
content: counters(item, ".") ". ";
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
details {
|
||||
background-color: var(--card-background);
|
||||
border-radius: var(--card-border-radius);
|
||||
box-shadow: var(--shadow-l2);
|
||||
|
||||
& > ul {
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 15px 0 15px 20px;
|
||||
padding: 5px;
|
||||
|
||||
& > ol,
|
||||
& > ul {
|
||||
margin-top: 10px;
|
||||
padding-left: 10px;
|
||||
margin-bottom: -5px;
|
||||
|
||||
& > li:last-child {
|
||||
margin-bottom: 0;
|
||||
&[open] {
|
||||
.article-toc-title {
|
||||
svg {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
li.active-class > a {
|
||||
border-left: var(--heading-border-size) solid var(--accent-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul li.active-class > a {
|
||||
display: block;
|
||||
}
|
||||
summary {
|
||||
list-style: none;
|
||||
padding: 15px 20px;
|
||||
cursor: pointer;
|
||||
|
||||
@function repeat($str, $n) {
|
||||
$result: "";
|
||||
@for $_ from 0 to $n {
|
||||
$result: $result + $str;
|
||||
}
|
||||
@return $result;
|
||||
}
|
||||
|
||||
// Support up to 6 levels of indentation for lists in ToCs
|
||||
@for $i from 0 to 5 {
|
||||
& > ul #{repeat("> li > ul", $i)} > li.active-class > a {
|
||||
$n: 25 + $i * 35;
|
||||
margin-left: calc(-#{$n}px - 1em);
|
||||
padding-left: calc(#{$n}px + 1em - var(--heading-border-size));
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
& > ol #{repeat("> li > ol", $i)} > li.active-class > a {
|
||||
$n: 9 + $i * 35;
|
||||
margin-left: calc(-#{$n}px - 1em);
|
||||
padding-left: calc(#{$n}px + 1em - var(--heading-border-size));
|
||||
display: block;
|
||||
.article-toc-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
color: var(--card-text-color-tertiary);
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
stroke-width: 1.33;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,7 +234,7 @@
|
||||
overflow-x: auto;
|
||||
padding-bottom: 15px;
|
||||
|
||||
& > .flex {
|
||||
&>.flex {
|
||||
float: left;
|
||||
}
|
||||
|
||||
@@ -208,7 +265,7 @@
|
||||
padding: 0 var(--card-padding);
|
||||
line-height: var(--article-line-height);
|
||||
|
||||
& > p {
|
||||
&>p {
|
||||
margin: 1.5em 0;
|
||||
}
|
||||
|
||||
@@ -316,10 +373,12 @@
|
||||
line-height: 1.428571429;
|
||||
word-break: break-all;
|
||||
padding: var(--card-padding);
|
||||
|
||||
// keep Codeblocks LTR
|
||||
[dir="rtl"] & {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
code {
|
||||
color: unset;
|
||||
border: none;
|
||||
@@ -338,10 +397,12 @@
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
// keep Codeblocks LTR
|
||||
[dir="rtl"] & {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: initial;
|
||||
padding: 0;
|
||||
@@ -406,8 +467,8 @@
|
||||
padding-bottom: 56.25%;
|
||||
overflow: hidden;
|
||||
|
||||
& > iframe,
|
||||
& > video {
|
||||
&>iframe,
|
||||
&>video {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -444,7 +505,7 @@
|
||||
}
|
||||
|
||||
/// Make long KaTeX equations scrollable in the x-axis
|
||||
.katex-display > .katex {
|
||||
.katex-display>.katex {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
@@ -458,4 +519,4 @@
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,10 +48,12 @@
|
||||
|
||||
.subsection-list {
|
||||
overflow-x: auto;
|
||||
margin-left: -24px;
|
||||
|
||||
.article-list--tile {
|
||||
display: flex;
|
||||
padding-bottom: 15px;
|
||||
padding: 8px 0 34px 24px;
|
||||
width: max-content;
|
||||
|
||||
article {
|
||||
width: 250px;
|
||||
@@ -69,4 +71,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,12 +21,15 @@
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.hamburger:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.hamburger.is-active:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.hamburger.is-active .hamburger-inner,
|
||||
.hamburger.is-active .hamburger-inner::before,
|
||||
.hamburger.is-active .hamburger-inner::after {
|
||||
@@ -58,14 +61,17 @@
|
||||
transition-duration: 0.15s;
|
||||
transition-timing-function: ease;
|
||||
}
|
||||
|
||||
.hamburger-inner::before,
|
||||
.hamburger-inner::after {
|
||||
content: "";
|
||||
display: block;
|
||||
}
|
||||
|
||||
.hamburger-inner::before {
|
||||
top: -10px;
|
||||
}
|
||||
|
||||
.hamburger-inner::after {
|
||||
bottom: -10px;
|
||||
}
|
||||
@@ -74,9 +80,11 @@
|
||||
transition-duration: 0.22s;
|
||||
transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
||||
}
|
||||
|
||||
.hamburger--spin .hamburger-inner::before {
|
||||
transition: top 0.1s 0.25s ease-in, opacity 0.1s ease-in;
|
||||
}
|
||||
|
||||
.hamburger--spin .hamburger-inner::after {
|
||||
transition: bottom 0.1s 0.25s ease-in, transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
||||
}
|
||||
@@ -86,11 +94,13 @@
|
||||
transition-delay: 0.12s;
|
||||
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
}
|
||||
|
||||
.hamburger--spin.is-active .hamburger-inner::before {
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
transition: top 0.1s ease-out, opacity 0.1s 0.12s ease-out;
|
||||
}
|
||||
|
||||
.hamburger--spin.is-active .hamburger-inner::after {
|
||||
bottom: 0;
|
||||
transform: rotate(-90deg);
|
||||
@@ -118,6 +128,7 @@
|
||||
outline: none;
|
||||
|
||||
&.is-active {
|
||||
|
||||
.hamburger-inner,
|
||||
.hamburger-inner::before,
|
||||
.hamburger-inner::after {
|
||||
@@ -144,7 +155,8 @@
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
&, .menu-bottom-section ol {
|
||||
&,
|
||||
.menu-bottom-section ol {
|
||||
flex-direction: column;
|
||||
gap: 30px;
|
||||
|
||||
@@ -226,4 +238,4 @@
|
||||
stroke: var(--body-text-color);
|
||||
stroke-width: 1.33;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,18 +4,47 @@
|
||||
box-shadow: var(--shadow-l1);
|
||||
border-radius: var(--card-border-radius);
|
||||
overflow: hidden;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.page-link {
|
||||
padding: 16px 32px;
|
||||
display: inline-flex;
|
||||
padding: 16px 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1 1 auto;
|
||||
min-width: 48px;
|
||||
color: var(--card-text-color-secondary);
|
||||
text-decoration: none;
|
||||
|
||||
&.current {
|
||||
font-weight: bold;
|
||||
background-color: var(--card-background-selected);
|
||||
color: var(--card-text-color-main);
|
||||
&:first-child,
|
||||
&:last-child {
|
||||
flex: 0 0 48px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
color: var(--card-text-color-secondary);
|
||||
&:hover:not(.current):not(.disabled) {
|
||||
background-color: var(--card-background-selected);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
&.current {
|
||||
background-color: var(--card-background-selected);
|
||||
color: var(--card-text-color-main);
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
color: var(--card-text-color-secondary);
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,25 @@
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
align-self: stretch;
|
||||
gap: var(--sidebar-element-separation);
|
||||
|
||||
@include respond(md) {
|
||||
gap: var(--sidebar-element-separation);
|
||||
}
|
||||
|
||||
margin-bottom: calc(-1 * var(--sidebar-element-separation));
|
||||
|
||||
@include respond(md) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&> :not(:last-child) {
|
||||
margin-bottom: var(--sidebar-element-separation);
|
||||
|
||||
@include respond(md) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
max-width: none;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
@@ -188,12 +206,23 @@
|
||||
|
||||
select {
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
background: none !important;
|
||||
color: var(--body-text-color);
|
||||
padding: 0 !important;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
|
||||
&::-ms-expand {
|
||||
display: none;
|
||||
}
|
||||
|
||||
option {
|
||||
color: var(--card-text-color-main);
|
||||
background-color: var(--card-background);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,3 @@
|
||||
$defaultTagBackgrounds: #8ea885, #df7988, #0177b8, #ffb900, #6b69d6;
|
||||
$defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
|
||||
/*
|
||||
* Global style
|
||||
*/
|
||||
@@ -41,10 +38,8 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
*/
|
||||
:root {
|
||||
--sys-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Droid Sans", "Helvetica Neue";
|
||||
--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", var(--zh-font-family), monospace;
|
||||
--base-font-family: "Lato", var(--sys-font-family), sans-serif;
|
||||
--code-font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
interface colorScheme {
|
||||
hash: string, /// Regenerate color scheme when the image hash is changed
|
||||
DarkMuted: {
|
||||
hex: string,
|
||||
rgb: Number[],
|
||||
bodyTextColor: string
|
||||
},
|
||||
Vibrant: {
|
||||
hex: string,
|
||||
rgb: Number[],
|
||||
bodyTextColor: string
|
||||
}
|
||||
}
|
||||
|
||||
let colorsCache: { [key: string]: colorScheme } = {};
|
||||
|
||||
if (localStorage.hasOwnProperty('StackColorsCache')) {
|
||||
try {
|
||||
colorsCache = JSON.parse(localStorage.getItem('StackColorsCache'));
|
||||
}
|
||||
catch (e) {
|
||||
colorsCache = {};
|
||||
}
|
||||
}
|
||||
|
||||
async function getColor(key: string, hash: string, imageURL: string) {
|
||||
if (!key) {
|
||||
/**
|
||||
* If no key is provided, do not cache the result
|
||||
*/
|
||||
return await Vibrant.from(imageURL).getPalette();
|
||||
}
|
||||
|
||||
if (!colorsCache.hasOwnProperty(key) || colorsCache[key].hash !== hash) {
|
||||
/**
|
||||
* If key is provided, but not found in cache, or the hash mismatches => Regenerate color scheme
|
||||
*/
|
||||
const palette = await Vibrant.from(imageURL).getPalette();
|
||||
|
||||
colorsCache[key] = {
|
||||
hash: hash,
|
||||
Vibrant: {
|
||||
hex: palette.Vibrant.hex,
|
||||
rgb: palette.Vibrant.rgb,
|
||||
bodyTextColor: palette.Vibrant.bodyTextColor
|
||||
},
|
||||
DarkMuted: {
|
||||
hex: palette.DarkMuted.hex,
|
||||
rgb: palette.DarkMuted.rgb,
|
||||
bodyTextColor: palette.DarkMuted.bodyTextColor
|
||||
}
|
||||
}
|
||||
|
||||
/* Save the result in localStorage */
|
||||
localStorage.setItem('StackColorsCache', JSON.stringify(colorsCache));
|
||||
}
|
||||
|
||||
return colorsCache[key];
|
||||
}
|
||||
|
||||
export {
|
||||
getColor
|
||||
}
|
||||
@@ -1,186 +1,97 @@
|
||||
declare global {
|
||||
interface Window {
|
||||
PhotoSwipe: any;
|
||||
PhotoSwipeUI_Default: any
|
||||
const wrap = (figures: HTMLElement[]) => {
|
||||
const galleryContainer = document.createElement('div');
|
||||
galleryContainer.className = 'gallery';
|
||||
|
||||
const parentNode = figures[0].parentNode!,
|
||||
first = figures[0];
|
||||
|
||||
parentNode.insertBefore(galleryContainer, first)
|
||||
|
||||
for (const figure of figures) {
|
||||
galleryContainer.appendChild(figure);
|
||||
}
|
||||
}
|
||||
|
||||
interface PhotoSwipeItem {
|
||||
w: number;
|
||||
h: number;
|
||||
src: string;
|
||||
msrc: string;
|
||||
title?: string;
|
||||
el: HTMLElement;
|
||||
}
|
||||
export default (container: HTMLElement) => {
|
||||
/// The process of wrapping image with figure tag is done using JavaScript instead of only Hugo markdown render hook
|
||||
/// because it can not detect whether image is being wrapped by a link or not
|
||||
/// and it lead to a invalid HTML construction (<a><figure><img></figure></a>)
|
||||
const images = container.querySelectorAll('img.gallery-image') as NodeListOf<HTMLImageElement>;
|
||||
for (const img of Array.from(images)) {
|
||||
/// Images are wrapped with figure tag if the paragraph has only images without texts
|
||||
/// This is done to allow inline images within paragraphs
|
||||
const paragraph = img.closest('p');
|
||||
|
||||
class StackGallery {
|
||||
private galleryUID: number;
|
||||
private items: PhotoSwipeItem[] = [];
|
||||
if (!paragraph || !container.contains(paragraph)) continue;
|
||||
|
||||
constructor(container: HTMLElement, galleryUID = 1) {
|
||||
if (window.PhotoSwipe == undefined || window.PhotoSwipeUI_Default == undefined) {
|
||||
console.error("PhotoSwipe lib not loaded.");
|
||||
return;
|
||||
if (paragraph.textContent.trim() == '') {
|
||||
/// Once we insert figcaption, this check no longer works
|
||||
/// So we add a class to paragraph to mark it
|
||||
paragraph.classList.add('no-text');
|
||||
}
|
||||
|
||||
this.galleryUID = galleryUID;
|
||||
let isNewLineImage = paragraph.classList.contains('no-text');
|
||||
if (!isNewLineImage) continue;
|
||||
|
||||
StackGallery.createGallery(container);
|
||||
this.loadItems(container);
|
||||
this.bindClick();
|
||||
}
|
||||
const hasLink = img.parentElement!.tagName == 'A';
|
||||
|
||||
private loadItems(container: HTMLElement) {
|
||||
this.items = [];
|
||||
let el: HTMLElement = img;
|
||||
/// Wrap image with figure tag, with flex-grow and flex-basis values extracted from img's data attributes
|
||||
const figure = document.createElement('figure');
|
||||
figure.classList.add('gallery-image');
|
||||
figure.style.setProperty('flex-grow', img.getAttribute('data-flex-grow') || '1');
|
||||
figure.style.setProperty('flex-basis', img.getAttribute('data-flex-basis') || '0');
|
||||
|
||||
const figures = container.querySelectorAll('figure.gallery-image');
|
||||
if (hasLink) {
|
||||
/// Wrap <a> if it exists
|
||||
el = img.parentElement!;
|
||||
el.classList.add('image-link');
|
||||
el.setAttribute('data-pswp-width', img.getAttribute('width')!);
|
||||
el.setAttribute('data-pswp-height', img.getAttribute('height')!);
|
||||
} else {
|
||||
const a = document.createElement('a');
|
||||
a.href = img.src;
|
||||
a.setAttribute('class', 'image-link');
|
||||
a.setAttribute('target', '_blank');
|
||||
a.setAttribute('data-pswp-width', img.getAttribute('width')!);
|
||||
a.setAttribute('data-pswp-height', img.getAttribute('height')!);
|
||||
img.parentNode!.insertBefore(a, img);
|
||||
a.appendChild(img);
|
||||
el = a;
|
||||
}
|
||||
|
||||
for (const el of figures) {
|
||||
const figcaption = el.querySelector('figcaption'),
|
||||
img = el.querySelector('img');
|
||||
el.parentElement!.insertBefore(figure, el);
|
||||
figure.appendChild(el);
|
||||
|
||||
let aux: PhotoSwipeItem = {
|
||||
w: parseInt(img.getAttribute('width')),
|
||||
h: parseInt(img.getAttribute('height')),
|
||||
src: img.src,
|
||||
msrc: img.getAttribute('data-thumb') || img.src,
|
||||
el: el
|
||||
}
|
||||
|
||||
if (figcaption) {
|
||||
aux.title = figcaption.innerHTML;
|
||||
}
|
||||
|
||||
this.items.push(aux);
|
||||
/// Add figcaption if it exists
|
||||
if (img.hasAttribute('alt')) {
|
||||
const figcaption = document.createElement('figcaption');
|
||||
figcaption.innerText = img.getAttribute('alt')!;
|
||||
figure.appendChild(figcaption);
|
||||
}
|
||||
}
|
||||
|
||||
public static createGallery(container: HTMLElement) {
|
||||
/// The process of wrapping image with figure tag is done using JavaScript instead of only Hugo markdown render hook
|
||||
/// because it can not detect whether image is being wrapped by a link or not
|
||||
/// and it lead to a invalid HTML construction (<a><figure><img></figure></a>)
|
||||
const figuresEl = container.querySelectorAll('figure.gallery-image') as NodeListOf<HTMLElement>;
|
||||
|
||||
const images = container.querySelectorAll('img.gallery-image');
|
||||
for (const img of Array.from(images)) {
|
||||
/// Images are wrapped with figure tag if the paragraph has only images without texts
|
||||
/// This is done to allow inline images within paragraphs
|
||||
const paragraph = img.closest('p');
|
||||
let currentGallery: HTMLElement[] = [];
|
||||
|
||||
if (!paragraph || !container.contains(paragraph)) continue;
|
||||
|
||||
if (paragraph.textContent.trim() == '') {
|
||||
/// Once we insert figcaption, this check no longer works
|
||||
/// So we add a class to paragraph to mark it
|
||||
paragraph.classList.add('no-text');
|
||||
}
|
||||
|
||||
let isNewLineImage = paragraph.classList.contains('no-text');
|
||||
if (!isNewLineImage) continue;
|
||||
|
||||
const hasLink = img.parentElement.tagName == 'A';
|
||||
|
||||
let el: HTMLElement = img;
|
||||
/// Wrap image with figure tag, with flex-grow and flex-basis values extracted from img's data attributes
|
||||
const figure = document.createElement('figure');
|
||||
figure.style.setProperty('flex-grow', img.getAttribute('data-flex-grow') || '1');
|
||||
figure.style.setProperty('flex-basis', img.getAttribute('data-flex-basis') || '0');
|
||||
if (hasLink) {
|
||||
/// Wrap <a> if it exists
|
||||
el = img.parentElement;
|
||||
}
|
||||
el.parentElement.insertBefore(figure, el);
|
||||
figure.appendChild(el);
|
||||
|
||||
/// Add figcaption if it exists
|
||||
if (img.hasAttribute('alt')) {
|
||||
const figcaption = document.createElement('figcaption');
|
||||
figcaption.innerText = img.getAttribute('alt');
|
||||
figure.appendChild(figcaption);
|
||||
}
|
||||
|
||||
/// Wrap img tag with <a> tag if image was not wrapped by <a> tag
|
||||
if (!hasLink) {
|
||||
figure.className = 'gallery-image';
|
||||
|
||||
const a = document.createElement('a');
|
||||
a.href = img.src;
|
||||
a.setAttribute('target', '_blank');
|
||||
img.parentNode.insertBefore(a, img);
|
||||
a.appendChild(img);
|
||||
}
|
||||
for (const figure of Array.from(figuresEl)) {
|
||||
if (!currentGallery.length) {
|
||||
/// First iteration
|
||||
currentGallery = [figure];
|
||||
}
|
||||
|
||||
const figuresEl = container.querySelectorAll('figure.gallery-image');
|
||||
|
||||
let currentGallery = [];
|
||||
|
||||
for (const figure of figuresEl) {
|
||||
if (!currentGallery.length) {
|
||||
/// First iteration
|
||||
currentGallery = [figure];
|
||||
}
|
||||
else if (figure.previousElementSibling === currentGallery[currentGallery.length - 1]) {
|
||||
/// Adjacent figures
|
||||
currentGallery.push(figure);
|
||||
}
|
||||
else if (currentGallery.length) {
|
||||
/// End gallery
|
||||
StackGallery.wrap(currentGallery);
|
||||
currentGallery = [figure];
|
||||
}
|
||||
else if (figure.previousElementSibling === currentGallery[currentGallery.length - 1]) {
|
||||
/// Adjacent figures
|
||||
currentGallery.push(figure);
|
||||
}
|
||||
|
||||
if (currentGallery.length > 0) {
|
||||
StackGallery.wrap(currentGallery);
|
||||
else if (currentGallery.length) {
|
||||
/// End gallery
|
||||
wrap(currentGallery);
|
||||
currentGallery = [figure];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap adjacent figure tags with div.gallery
|
||||
* @param figures
|
||||
*/
|
||||
public static wrap(figures: HTMLElement[]) {
|
||||
const galleryContainer = document.createElement('div');
|
||||
galleryContainer.className = 'gallery';
|
||||
|
||||
const parentNode = figures[0].parentNode,
|
||||
first = figures[0];
|
||||
|
||||
parentNode.insertBefore(galleryContainer, first)
|
||||
|
||||
for (const figure of figures) {
|
||||
galleryContainer.appendChild(figure);
|
||||
}
|
||||
if (currentGallery.length > 0) {
|
||||
wrap(currentGallery);
|
||||
}
|
||||
|
||||
public open(index: number) {
|
||||
const pswp = document.querySelector('.pswp') as HTMLDivElement;
|
||||
const ps = new window.PhotoSwipe(pswp, window.PhotoSwipeUI_Default, this.items, {
|
||||
index: index,
|
||||
galleryUID: this.galleryUID,
|
||||
getThumbBoundsFn: (index) => {
|
||||
const thumbnail = this.items[index].el.getElementsByTagName('img')[0],
|
||||
pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
|
||||
rect = thumbnail.getBoundingClientRect();
|
||||
|
||||
return { x: rect.left, y: rect.top + pageYScroll, w: rect.width };
|
||||
}
|
||||
});
|
||||
|
||||
ps.init();
|
||||
}
|
||||
|
||||
private bindClick() {
|
||||
for (const [index, item] of this.items.entries()) {
|
||||
const a = item.el.querySelector('a');
|
||||
|
||||
a.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
this.open(index);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default StackGallery;
|
||||
};
|
||||
@@ -5,13 +5,11 @@
|
||||
* @website: https://jimmycai.com
|
||||
* @link: https://github.com/CaiJimmy/hugo-theme-stack
|
||||
*/
|
||||
import StackGallery from "ts/gallery";
|
||||
import { getColor } from 'ts/color';
|
||||
import menu from 'ts/menu';
|
||||
import createElement from 'ts/createElement';
|
||||
import StackColorScheme from 'ts/colorScheme';
|
||||
import { setupScrollspy } from 'ts/scrollspy';
|
||||
import { setupSmoothAnchors } from "ts/smoothAnchors";
|
||||
import menu from './menu';
|
||||
import createElement from './createElement';
|
||||
import StackColorScheme from './colorScheme';
|
||||
import { setupScrollspy } from './scrollspy';
|
||||
import { setupSmoothAnchors } from './smoothAnchors';
|
||||
|
||||
let Stack = {
|
||||
init: () => {
|
||||
@@ -22,43 +20,10 @@ let Stack = {
|
||||
|
||||
const articleContent = document.querySelector('.article-content') as HTMLElement;
|
||||
if (articleContent) {
|
||||
new StackGallery(articleContent);
|
||||
setupSmoothAnchors();
|
||||
setupScrollspy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add linear gradient background to tile style article
|
||||
*/
|
||||
const articleTile = document.querySelector('.article-list--tile');
|
||||
if (articleTile) {
|
||||
let observer = new IntersectionObserver(async (entries, observer) => {
|
||||
entries.forEach(entry => {
|
||||
if (!entry.isIntersecting) return;
|
||||
observer.unobserve(entry.target);
|
||||
|
||||
const articles = entry.target.querySelectorAll('article.has-image');
|
||||
articles.forEach(async articles => {
|
||||
const image = articles.querySelector('img'),
|
||||
imageURL = image.src,
|
||||
key = image.getAttribute('data-key'),
|
||||
hash = image.getAttribute('data-hash'),
|
||||
articleDetails: HTMLDivElement = articles.querySelector('.article-details');
|
||||
|
||||
const colors = await getColor(key, hash, imageURL);
|
||||
|
||||
articleDetails.style.background = `
|
||||
linear-gradient(0deg,
|
||||
rgba(${colors.DarkMuted.rgb[0]}, ${colors.DarkMuted.rgb[1]}, ${colors.DarkMuted.rgb[2]}, 0.5) 0%,
|
||||
rgba(${colors.Vibrant.rgb[0]}, ${colors.Vibrant.rgb[1]}, ${colors.Vibrant.rgb[2]}, 0.75) 100%)`;
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
observer.observe(articleTile)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add copy button to code block
|
||||
*/
|
||||
@@ -91,7 +56,7 @@ let Stack = {
|
||||
});
|
||||
});
|
||||
|
||||
new StackColorScheme(document.getElementById('dark-mode-toggle'));
|
||||
new StackColorScheme(document.getElementById('dark-mode-toggle')!);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[hugoVersion]
|
||||
extended = true
|
||||
min = "0.154.0"
|
||||
@@ -0,0 +1,140 @@
|
||||
mainSections = ["post"]
|
||||
featuredImageField = "image"
|
||||
rssFullContent = true
|
||||
|
||||
[footer]
|
||||
since = 2026
|
||||
customText = ""
|
||||
|
||||
[dateFormat]
|
||||
published = ":date_full"
|
||||
lastUpdated = ":date_full"
|
||||
|
||||
[sidebar]
|
||||
compact = false
|
||||
|
||||
[sidebar.avatar]
|
||||
enabled = false
|
||||
local = true
|
||||
src = "img/avatar.png"
|
||||
|
||||
[article]
|
||||
headingAnchor = false
|
||||
math = false
|
||||
toc = true
|
||||
readingTime = true
|
||||
|
||||
[article.license]
|
||||
enabled = false
|
||||
default = "Licensed under CC BY-NC-SA 4.0"
|
||||
|
||||
[widgets]
|
||||
homepage = []
|
||||
page = []
|
||||
|
||||
[opengraph.twitter]
|
||||
site = ""
|
||||
card = "summary_large_image"
|
||||
|
||||
[colorScheme]
|
||||
toggle = true
|
||||
default = "auto"
|
||||
|
||||
[imageProcessing.cover]
|
||||
enabled = true
|
||||
|
||||
[imageProcessing.content]
|
||||
enabled = true
|
||||
|
||||
[comments]
|
||||
enabled = true
|
||||
provider = "disqus"
|
||||
|
||||
[comments.disqusjs]
|
||||
shortname = ""
|
||||
apiUrl = ""
|
||||
apiKey = ""
|
||||
admin = ""
|
||||
adminLabel = ""
|
||||
|
||||
[comments.utterances]
|
||||
repo = ""
|
||||
issueTerm = "pathname"
|
||||
label = ""
|
||||
|
||||
[comments.beaudar]
|
||||
repo = ""
|
||||
issueTerm = "pathname"
|
||||
label = ""
|
||||
theme = ""
|
||||
|
||||
[comments.remark42]
|
||||
host = ""
|
||||
site = ""
|
||||
locale = "en"
|
||||
max_shown_comments = 15
|
||||
show_email_subscription = true
|
||||
|
||||
[comments.vssue]
|
||||
platform = ""
|
||||
owner = ""
|
||||
repo = ""
|
||||
clientId = ""
|
||||
clientSecret = ""
|
||||
autoCreateIssue = false
|
||||
|
||||
# Waline client configuration see: https://waline.js.org/en/reference/component.html
|
||||
[comments.waline]
|
||||
serverURL = ""
|
||||
lang = ""
|
||||
pageview = ""
|
||||
emoji = [
|
||||
"https://unpkg.com/@waline/emojis@1.0.1/weibo"
|
||||
]
|
||||
requiredMeta = [
|
||||
"name",
|
||||
"email",
|
||||
"url"
|
||||
]
|
||||
[comments.waline.locale]
|
||||
admin = "Admin"
|
||||
placeholder = ""
|
||||
|
||||
[comments.twikoo]
|
||||
envId = ""
|
||||
region = ""
|
||||
path = ""
|
||||
lang = ""
|
||||
|
||||
# See https://cactus.chat/docs/reference/web-client/#configuration for description of the various options
|
||||
[comments.cactus]
|
||||
defaultHomeserverUrl = "https://matrix.cactus.chat:8448"
|
||||
serverName = "cactus.chat"
|
||||
siteName = "" # You must insert a unique identifier here matching the one you registered (See https://cactus.chat/docs/getting-started/quick-start/#register-your-site)
|
||||
|
||||
[comments.giscus]
|
||||
repo = ""
|
||||
repoID = ""
|
||||
category = ""
|
||||
categoryID = ""
|
||||
mapping = "title"
|
||||
lightTheme = "light"
|
||||
darkTheme = "dark_dimmed"
|
||||
reactionsEnabled = 1
|
||||
emitMetadata = 0
|
||||
inputPosition = "top"
|
||||
lang = "en"
|
||||
strict = 0
|
||||
loading = "lazy"
|
||||
|
||||
[comments.gitalk]
|
||||
owner = ""
|
||||
admin = ""
|
||||
repo = ""
|
||||
clientID = ""
|
||||
clientSecret = ""
|
||||
proxy = ""
|
||||
|
||||
[comments.cusdis]
|
||||
host = "https://cusdis.com"
|
||||
id = ""
|
||||
@@ -0,0 +1,15 @@
|
||||
KaTeX = [
|
||||
{ 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.16.9/dist/katex.min.js", integrity = "sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8", type = "script", defer = true },
|
||||
{ src = "https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js", integrity = "sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05", type = "script", defer = true },
|
||||
]
|
||||
|
||||
Cactus = [
|
||||
{ src = "https://latest.cactus.chat/cactus.js", type = "script" },
|
||||
{ src = "https://latest.cactus.chat/style.css", type = "style" },
|
||||
]
|
||||
|
||||
[PhotoSwipe]
|
||||
Style = "https://cdn.jsdelivr.net/npm/photoswipe@5.4.4/dist/photoswipe.css"
|
||||
Core = "https://cdn.jsdelivr.net/npm/photoswipe@5.4.4/dist/photoswipe.esm.min.js"
|
||||
Lightbox = "https://cdn.jsdelivr.net/npm/photoswipe@5.4.4/dist/photoswipe-lightbox.esm.min.js"
|
||||
@@ -1,44 +0,0 @@
|
||||
Vibrant:
|
||||
- src: https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js
|
||||
integrity: sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=
|
||||
type: script
|
||||
|
||||
PhotoSwipe:
|
||||
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js
|
||||
integrity: sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=
|
||||
type: script
|
||||
defer: true
|
||||
|
||||
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js
|
||||
integrity: sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=
|
||||
type: script
|
||||
defer: true
|
||||
|
||||
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css
|
||||
type: style
|
||||
|
||||
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css
|
||||
type: style
|
||||
|
||||
KaTeX:
|
||||
- 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.16.9/dist/katex.min.js
|
||||
integrity: sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8
|
||||
type: script
|
||||
defer: true
|
||||
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js
|
||||
integrity: sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05
|
||||
type: script
|
||||
defer: true
|
||||
|
||||
Cactus:
|
||||
- src: https://latest.cactus.chat/cactus.js
|
||||
integrity:
|
||||
type: script
|
||||
- src: https://latest.cactus.chat/style.css
|
||||
integrity:
|
||||
type: style
|
||||
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
@@ -0,0 +1,24 @@
|
||||
baseURL = "https://demo.stack.jimmycai.com/"
|
||||
languageCode = "en-us"
|
||||
title = "Hugo Theme Stack"
|
||||
|
||||
# Theme i18n support
|
||||
# See i18n folder for available languages
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
# Set hasCJKLanguage to true if DefaultContentLanguage is a CJK language
|
||||
# This will make .Summary and .WordCount behave correctly
|
||||
hasCJKLanguage = false
|
||||
|
||||
[[module.imports]]
|
||||
path = "github.com/CaiJimmy/hugo-theme-stack/v3"
|
||||
|
||||
[pagination]
|
||||
pagerSize = 5
|
||||
|
||||
[permalinks]
|
||||
post = "/p/:slug/"
|
||||
page = "/:slug/"
|
||||
|
||||
[services.disqus]
|
||||
shortname = "hugo-theme-stack"
|
||||
@@ -0,0 +1,27 @@
|
||||
[en]
|
||||
languageName = "English"
|
||||
title = "Hugo Theme Stack"
|
||||
weight = 1
|
||||
[en.params.sidebar]
|
||||
subtitle = "Card-style Hugo theme designed for bloggers"
|
||||
|
||||
[zh]
|
||||
languageName = "简体中文"
|
||||
title = "Hugo 主题 Stack"
|
||||
weight = 2
|
||||
[zh.params.sidebar]
|
||||
subtitle = "为博客设计的卡片式 Hugo 主题"
|
||||
|
||||
[zh-hant-tw]
|
||||
languageName = "正體中文"
|
||||
title = "Hugo 主題 Stack"
|
||||
weight = 3
|
||||
[zh-hant-tw.params.sidebar]
|
||||
subtitle = "為博客設計的卡片式 Hugo 主題"
|
||||
|
||||
[ja]
|
||||
languageName = "日本語"
|
||||
title = "Hugo Theme Stack"
|
||||
weight = 4
|
||||
[ja.params.sidebar]
|
||||
subtitle = "ブログ用のカードスタイルの Hugo テーマ"
|
||||
@@ -0,0 +1,24 @@
|
||||
[goldmark]
|
||||
[goldmark.extensions]
|
||||
[goldmark.extensions.passthrough]
|
||||
enable = true
|
||||
[goldmark.extensions.passthrough.delimiters]
|
||||
block = [["\\[", "\\]"], ["$$", "$$"]]
|
||||
inline = [["\\(", "\\)"]]
|
||||
[goldmark.renderer]
|
||||
## Set to true if you have HTML content inside Markdown
|
||||
unsafe = true
|
||||
|
||||
[tableOfContents]
|
||||
endLevel = 4
|
||||
ordered = true
|
||||
startLevel = 2
|
||||
|
||||
[highlight]
|
||||
noClasses = false
|
||||
codeFences = true
|
||||
guessSyntax = true
|
||||
lineNoStart = 1
|
||||
lineNos = true
|
||||
lineNumbersInTable = true
|
||||
tabWidth = 4
|
||||
@@ -0,0 +1,13 @@
|
||||
[[social]]
|
||||
identifier = "github"
|
||||
name = "GitHub"
|
||||
url = "https://github.com/CaiJimmy/hugo-theme-stack"
|
||||
[social.params]
|
||||
icon = "brand-github"
|
||||
|
||||
[[social]]
|
||||
identifier = "twitter"
|
||||
name = "Twitter"
|
||||
url = "https://twitter.com"
|
||||
[social.params]
|
||||
icon = "brand-twitter"
|
||||
@@ -0,0 +1,33 @@
|
||||
mainSections = ["post"]
|
||||
rssFullContent = true
|
||||
favicon = "img/avatar.png"
|
||||
|
||||
[footer]
|
||||
since = 2020
|
||||
|
||||
[sidebar]
|
||||
emoji = "✏️"
|
||||
subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
||||
[sidebar.avatar]
|
||||
enabled = true
|
||||
local = true
|
||||
src = "img/avatar.png"
|
||||
|
||||
[article]
|
||||
[article.license]
|
||||
enabled = true
|
||||
default = "Licensed under CC BY-NC-SA 4.0"
|
||||
|
||||
[widgets]
|
||||
homepage = [
|
||||
{ type = "search" },
|
||||
{ type = "archives", params = { limit = 5 } },
|
||||
{ type = "categories", params = { limit = 10 } },
|
||||
{ type = "tag-cloud", params = { limit = 10 } },
|
||||
]
|
||||
page = [{ type = "toc" }]
|
||||
|
||||
[comments]
|
||||
# See complete configuration in config/_default/params.toml
|
||||
enabled = true
|
||||
provider = "disqus"
|
||||
@@ -0,0 +1,8 @@
|
||||
includeNewer = true
|
||||
threshold = 60
|
||||
toLower = false
|
||||
|
||||
indices = [
|
||||
{ name = "tags", weight = 100 },
|
||||
{ name = "categories", weight = 200 },
|
||||
]
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
menu:
|
||||
main:
|
||||
name: ホーム
|
||||
weight: -100
|
||||
params:
|
||||
icon: home
|
||||
---
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
menu:
|
||||
main:
|
||||
name: 主頁
|
||||
weight: -100
|
||||
params:
|
||||
icon: home
|
||||
---
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: ドキュメント
|
||||
description: "Stack テーマの使用方法に関する投稿"
|
||||
slug: "documentation"
|
||||
image: "hutomo-abrianto-l2jk-uxb1BY-unsplash.jpg"
|
||||
style:
|
||||
background: "#2a9d8f"
|
||||
color: "#fff"
|
||||
---
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: Documentation
|
||||
description: "Posts about how to use Stack theme"
|
||||
slug: "documentation"
|
||||
image: "hutomo-abrianto-l2jk-uxb1BY-unsplash.jpg"
|
||||
style:
|
||||
background: "#2a9d8f"
|
||||
color: "#fff"
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Test"
|
||||
description: "This is an example category"
|
||||
slug: "test"
|
||||
title: 文檔
|
||||
description: "關於如何使用 Stack 主題的文章"
|
||||
slug: "documentation"
|
||||
image: "hutomo-abrianto-l2jk-uxb1BY-unsplash.jpg"
|
||||
style:
|
||||
background: "#2a9d8f"
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: 文档
|
||||
description: "关于如何使用 Stack 主题的文章"
|
||||
slug: "documentation"
|
||||
image: "hutomo-abrianto-l2jk-uxb1BY-unsplash.jpg"
|
||||
style:
|
||||
background: "#2a9d8f"
|
||||
color: "#fff"
|
||||
---
|
||||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: このサイトについて
|
||||
description: このサイトとその著者についてのすべて。
|
||||
date: 2026-01-26
|
||||
lastmod: 2026-01-26
|
||||
menu:
|
||||
main:
|
||||
weight: -90
|
||||
params:
|
||||
icon: user
|
||||
---
|
||||
|
||||
## 誰のためのページですか?
|
||||
|
||||
これは**サンプル詳細**ページです。あなた自身、あなたのブログ、またはあなたのプロジェクトを紹介するために使用できます。
|
||||
|
||||
## 著者について
|
||||
|
||||
こんにちは!私はブログとオープンソースに情熱を注いでいる愛好家です。新しい技術を探索し、その経験をコミュニティと共有することが大好きです。
|
||||
|
||||
### 私の歩み
|
||||
|
||||
10年以上前にWeb開発の旅を始めました。それ以来、個人のブログから大規模なエンタープライズアプリケーションまで、数多くのプロジェクトに携わってきました。
|
||||
|
||||
### スキル
|
||||
|
||||
- **フロントエンド**: HTML, CSS, JavaScript, React, Vue
|
||||
- **バックエンド**: Node.js, Python, Go
|
||||
- **ツール**: Git, Docker, Hugo, Neovim
|
||||
|
||||
## お問い合わせ
|
||||
|
||||
質問がある場合や、単にあいさつをしたい場合は、お気軽にご連絡ください!
|
||||
|
||||
- **メール**: [hello@example.com](mailto:hello@example.com)
|
||||
- **Twitter**: [@example](https://twitter.com/example)
|
||||
- **GitHub**: [example](https://github.com/example)
|
||||
|
||||
---
|
||||
|
||||
> "Logic will get you from A to B. Imagination will take you everywhere."
|
||||
> — *Albert Einstein*
|
||||
|
||||
---
|
||||
*このページは AI によって生成されました。*
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: About
|
||||
description: Everything you need to know about this site and its author.
|
||||
date: 2026-01-26
|
||||
lastmod: 2026-01-26
|
||||
menu:
|
||||
main:
|
||||
weight: -90
|
||||
params:
|
||||
icon: user
|
||||
---
|
||||
|
||||
## Who is this for?
|
||||
|
||||
This is a sample **About** page. You can use it to introduce yourself, your blog, or your project.
|
||||
|
||||
## About the Author
|
||||
|
||||
Hello! I'm a passionate blogger and open-source enthusiast. I love exploring new technologies and sharing my experiences with the community.
|
||||
|
||||
### My Journey
|
||||
|
||||
I started my journey in web development over 10 years ago. Since then, I've worked on numerous projects ranging from small personal blogs to large-scale enterprise applications.
|
||||
|
||||
### Skills
|
||||
|
||||
- **Front-end**: HTML, CSS, JavaScript, React, Vue
|
||||
- **Back-end**: Node.js, Python, Go
|
||||
- **Tools**: Git, Docker, Hugo, Neovim
|
||||
|
||||
## Contact Me
|
||||
|
||||
Feel free to reach out if you have any questions or just want to say hi!
|
||||
|
||||
- **Email**: [hello@example.com](mailto:hello@example.com)
|
||||
- **Twitter**: [@example](https://twitter.com/example)
|
||||
- **GitHub**: [example](https://github.com/example)
|
||||
|
||||
---
|
||||
|
||||
> "Logic will get you from A to B. Imagination will take you everywhere."
|
||||
> — *Albert Einstein*
|
||||
|
||||
---
|
||||
*This page was generated by AI.*
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: 關於
|
||||
description: 關於本站及其作者的一切。
|
||||
date: 2026-01-26
|
||||
lastmod: 2026-01-26
|
||||
menu:
|
||||
main:
|
||||
weight: -90
|
||||
params:
|
||||
icon: user
|
||||
---
|
||||
|
||||
## 這是給誰看的?
|
||||
|
||||
這是一個示例**關於**頁面。你可以用它來介紹你自己、你的博客或你的項目。
|
||||
|
||||
## 關於作者
|
||||
|
||||
你好!我是一個熱衷於博客和開源的愛好者。我喜歡探索新技術並向社區分享我的經驗。
|
||||
|
||||
### 我的旅程
|
||||
|
||||
我在 10 多年前開始了我的 Web 開發之旅。自那以後,我參與了許多項目,從個人博客到大規模企業應用。
|
||||
|
||||
### 技能
|
||||
|
||||
- **前端**: HTML, CSS, JavaScript, React, Vue
|
||||
- **後端**: Node.js, Python, Go
|
||||
- **工具**: Git, Docker, Hugo, Neovim
|
||||
|
||||
## 聯繫我
|
||||
|
||||
如果你有任何問題或只是想打個招呼,請隨時聯繫我!
|
||||
|
||||
- **電子郵件**: [hello@example.com](mailto:hello@example.com)
|
||||
- **Twitter**: [@example](https://twitter.com/example)
|
||||
- **GitHub**: [example](https://github.com/example)
|
||||
|
||||
---
|
||||
|
||||
> "Logic will get you from A to B. Imagination will take you everywhere."
|
||||
> — *Albert Einstein*
|
||||
|
||||
---
|
||||
*此頁面由 AI 生成。*
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: 关于
|
||||
description: 关于本站及其作者的一切。
|
||||
date: 2026-01-26
|
||||
lastmod: 2026-01-26
|
||||
menu:
|
||||
main:
|
||||
weight: -90
|
||||
params:
|
||||
icon: user
|
||||
---
|
||||
|
||||
## 这是给谁看的?
|
||||
|
||||
这是一个示例**关于**页面。你可以用它来介绍你自己、你的博客或你的项目。
|
||||
|
||||
## 关于作者
|
||||
|
||||
你好!我是一个热衷于博客和开源的爱好者。我喜欢探索新技术并向社区分享我的经验。
|
||||
|
||||
### 我的旅程
|
||||
|
||||
我在 10 多年前开始了我的 Web 开发之旅。自那以后,我参与了许多项目,从个人博客到大规模企业应用。
|
||||
|
||||
### 技能
|
||||
|
||||
- **前端**: HTML, CSS, JavaScript, React, Vue
|
||||
- **后端**: Node.js, Python, Go
|
||||
- **工具**: Git, Docker, Hugo, Neovim
|
||||
|
||||
## 联系我
|
||||
|
||||
如果你有任何问题或只是想打个招呼,请随时联系我!
|
||||
|
||||
- **电子邮件**: [hello@example.com](mailto:hello@example.com)
|
||||
- **Twitter**: [@example](https://twitter.com/example)
|
||||
- **GitHub**: [example](https://github.com/example)
|
||||
|
||||
---
|
||||
|
||||
> "Logic will get you from A to B. Imagination will take you everywhere."
|
||||
> — *Albert Einstein*
|
||||
|
||||
---
|
||||
*此页面由 AI 生成。*
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "アーカイブ"
|
||||
date: 2019-05-28
|
||||
layout: "archives"
|
||||
slug: "archives"
|
||||
menu:
|
||||
main:
|
||||
weight: -70
|
||||
params:
|
||||
icon: archives
|
||||
---
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "歸檔"
|
||||
date: 2019-05-28
|
||||
layout: "archives"
|
||||
slug: "archives"
|
||||
menu:
|
||||
main:
|
||||
weight: -70
|
||||
params:
|
||||
icon: archives
|
||||
---
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "归档"
|
||||
date: 2019-05-28
|
||||
layout: "archives"
|
||||
slug: "archives"
|
||||
menu:
|
||||
main:
|
||||
weight: -70
|
||||
params:
|
||||
icon: archives
|
||||
---
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "リンク"
|
||||
links:
|
||||
- title: GitHub
|
||||
description: GitHubは、世界最大のソフトウェア開発プラットフォームです。
|
||||
website: https://github.com
|
||||
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
||||
- title: TypeScript
|
||||
description: TypeScriptは、JavaScriptの静的型付けされたスーパーセットで、純粋なJavaScriptにコンパイルされます。
|
||||
website: https://www.typescriptlang.org
|
||||
image: ts-logo-128.jpg
|
||||
menu:
|
||||
main:
|
||||
weight: -50
|
||||
params:
|
||||
icon: link
|
||||
comments: false
|
||||
---
|
||||
|
||||
この機能を使用するには、フロントマターに `links` セクションを追加します。
|
||||
|
||||
このページのフロントマター:
|
||||
|
||||
```yaml
|
||||
links:
|
||||
- title: GitHub
|
||||
description: GitHubは、世界最大のソフトウェア開発プラットフォームです。
|
||||
website: https://github.com
|
||||
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
||||
- title: TypeScript
|
||||
description: TypeScriptは、JavaScriptの静的型付けされたスーパーセットで、純粋なJavaScriptにコンパイルされます。
|
||||
website: https://www.typescriptlang.org
|
||||
image: ts-logo-128.jpg
|
||||
```
|
||||
|
||||
`image` フィールドは、ローカル画像と外部画像の両方を受け入れます。
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "鏈接"
|
||||
links:
|
||||
- title: GitHub
|
||||
description: GitHub 是世界上最大的軟件開發平台。
|
||||
website: https://github.com
|
||||
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
||||
- title: TypeScript
|
||||
description: TypeScript 是 JavaScript 的一個超集,它可以編譯成純 JavaScript。
|
||||
website: https://www.typescriptlang.org
|
||||
image: ts-logo-128.jpg
|
||||
menu:
|
||||
main:
|
||||
weight: -50
|
||||
params:
|
||||
icon: link
|
||||
comments: false
|
||||
---
|
||||
|
||||
要使用此功能,請在 frontmatter 中添加 `links` 部分。
|
||||
|
||||
此頁面的 frontmatter:
|
||||
|
||||
```yaml
|
||||
links:
|
||||
- title: GitHub
|
||||
description: GitHub 是世界上最大的軟件開發平台。
|
||||
website: https://github.com
|
||||
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
||||
- title: TypeScript
|
||||
description: TypeScript 是 JavaScript 的一個超集,它可以編譯成純 JavaScript。
|
||||
website: https://www.typescriptlang.org
|
||||
image: ts-logo-128.jpg
|
||||
```
|
||||
|
||||
`image` 字段支持本地和外部圖像。
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "链接"
|
||||
links:
|
||||
- title: GitHub
|
||||
description: GitHub 是世界上最大的软件开发平台。
|
||||
website: https://github.com
|
||||
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
||||
- title: TypeScript
|
||||
description: TypeScript 是 JavaScript 的一个超集,它可以编译成纯 JavaScript。
|
||||
website: https://www.typescriptlang.org
|
||||
image: ts-logo-128.jpg
|
||||
menu:
|
||||
main:
|
||||
weight: -50
|
||||
params:
|
||||
icon: link
|
||||
comments: false
|
||||
---
|
||||
|
||||
要使用此功能,请在 frontmatter 中添加 `links` 部分。
|
||||
|
||||
此页面的 frontmatter:
|
||||
|
||||
```yaml
|
||||
links:
|
||||
- title: GitHub
|
||||
description: GitHub 是世界上最大的软件开发平台。
|
||||
website: https://github.com
|
||||
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
||||
- title: TypeScript
|
||||
description: TypeScript 是 JavaScript 的一个超集,它可以编译成纯 JavaScript。
|
||||
website: https://www.typescriptlang.org
|
||||
image: ts-logo-128.jpg
|
||||
```
|
||||
|
||||
`image` 字段支持本地和外部图像。
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "検索"
|
||||
slug: "search"
|
||||
layout: "search"
|
||||
outputs:
|
||||
- html
|
||||
- json
|
||||
menu:
|
||||
main:
|
||||
weight: -60
|
||||
params:
|
||||
icon: search
|
||||
---
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "搜索"
|
||||
slug: "search"
|
||||
layout: "search"
|
||||
outputs:
|
||||
- html
|
||||
- json
|
||||
menu:
|
||||
main:
|
||||
weight: -60
|
||||
params:
|
||||
icon: search
|
||||
---
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "搜索"
|
||||
slug: "search"
|
||||
layout: "search"
|
||||
outputs:
|
||||
- html
|
||||
- json
|
||||
menu:
|
||||
main:
|
||||
weight: -60
|
||||
params:
|
||||
icon: search
|
||||
---
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: 写真ギャラリー
|
||||
description: 内蔵の写真ギャラリー機能を披露
|
||||
date: 2026-01-26
|
||||
slug: image-gallery
|
||||
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||
categories:
|
||||
- Documentation
|
||||
tags:
|
||||
- Gallery
|
||||
- Photoswipe
|
||||
toc: false
|
||||
---
|
||||
|
||||
Stack テーマには、写真ギャラリー機能が内蔵されています。複数の画像を並べて配置するだけで、美しいギャラリーを作成できます。
|
||||
|
||||
## ギャラリーの例
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
## 仕組み
|
||||
|
||||
ギャラリーは **Photoswipe** と独自の内部スクリプトによって動作します。画像の縦横比に基づいて、最適なレイアウトが自動的に計算されます。
|
||||
|
||||
ギャラリーを作成するには、同じ行(または同じ段落)に複数の画像を配置するだけです。
|
||||
|
||||
### 構文
|
||||
|
||||
```markdown
|
||||
 
|
||||
|
||||
 
|
||||
```
|
||||
|
||||
> **注意**: Markdown で画像が同じ行に保持されるように、画像の間には 2 つのスペースを入れる必要があります。
|
||||
|
||||
---
|
||||
|
||||
ギャラリーの構文は [Typlog](https://typlog.com/) にインスパイアされています。
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Image Gallery
|
||||
description: Showcasing the built-in image gallery support
|
||||
date: 2026-01-26
|
||||
slug: image-gallery
|
||||
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||
categories:
|
||||
- Documentation
|
||||
tags:
|
||||
- Gallery
|
||||
- Photoswipe
|
||||
toc: false
|
||||
---
|
||||
|
||||
Stack theme has a built-in support for image galleries. It allows you to create a beautiful gallery by simply placing multiple images side-by-side.
|
||||
|
||||
## Sample Gallery
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
## How it works
|
||||
|
||||
The gallery is powered by **Photoswipe** and a custom internal script. It automatically calculates the best layout for your images based on their aspect ratios.
|
||||
|
||||
To create a gallery, you just need to put multiple images in the same line (or paragraph).
|
||||
|
||||
### Syntax
|
||||
|
||||
```markdown
|
||||
 
|
||||
|
||||
 
|
||||
```
|
||||
|
||||
> **Note**: There should be two spaces between the images to ensure they stay in the same line in Markdown
|
||||
|
||||
---
|
||||
|
||||
Gallery Syntax inspired by [Typlog](https://typlog.com/)
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: 相簿
|
||||
description: 展示內置的相簿支持
|
||||
date: 2026-01-26
|
||||
slug: image-gallery
|
||||
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||
categories:
|
||||
- Documentation
|
||||
tags:
|
||||
- Gallery
|
||||
- Photoswipe
|
||||
toc: false
|
||||
---
|
||||
|
||||
Stack 主題內置了對相簿的支持。你只需要簡單地將多張圖片並排放置,就可以創建一個精美的相簿。
|
||||
|
||||
## 示例相簿
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
## 它是如何工作的
|
||||
|
||||
相簿由 **Photoswipe** 和一個自定義的內部腳本驅動。它會根據圖片的寬高比自動計算出最佳佈局。
|
||||
|
||||
要創建一個相簿,你只需要將多張圖片放在同一行(或同一個段落)中。
|
||||
|
||||
### 語法
|
||||
|
||||
```markdown
|
||||
 
|
||||
|
||||
 
|
||||
```
|
||||
|
||||
> **注意**: 圖片之間應該有兩個空格,以確保它們在 Markdown 中保持在同一行。
|
||||
|
||||
---
|
||||
|
||||
相簿語法啟發自 [Typlog](https://typlog.com/)
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: 相册
|
||||
description: 展示内置的相册支持
|
||||
date: 2026-01-26
|
||||
slug: image-gallery
|
||||
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||
categories:
|
||||
- Documentation
|
||||
tags:
|
||||
- Gallery
|
||||
- Photoswipe
|
||||
toc: false
|
||||
---
|
||||
|
||||
Stack 主题内置了对相册的支持。你只需要简单地将多张图片并排放置,就可以创建一个精美的相册。
|
||||
|
||||
## 示例相册
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
## 它是如何工作的
|
||||
|
||||
相册由 **Photoswipe** 和一个自定义的内部脚本驱动。它会根据图片的宽高比自动计算出最佳布局。
|
||||
|
||||
要创建一个相册,你只需要将多张图片放在同一行(或同一个段落)中。
|
||||
|
||||
### 语法
|
||||
|
||||
```markdown
|
||||
 
|
||||
|
||||
 
|
||||
```
|
||||
|
||||
> **注意**: 图片之间应该有两个空格,以确保它们在 Markdown 中保持在同一行。
|
||||
|
||||
---
|
||||
|
||||
相册语法启发自 [Typlog](https://typlog.com/)
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
@@ -1,32 +1,25 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Markdown Syntax Guide"
|
||||
date = "2019-03-11"
|
||||
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
tags = [
|
||||
"markdown",
|
||||
"css",
|
||||
"html",
|
||||
"themes",
|
||||
]
|
||||
categories = [
|
||||
"themes",
|
||||
"syntax",
|
||||
]
|
||||
series = ["Themes Guide"]
|
||||
aliases = ["migrate-from-jekyl"]
|
||||
image = "pawel-czerwinski-8uZPynIu-rQ-unsplash.jpg"
|
||||
+++
|
||||
---
|
||||
title: Markdown Syntax Guide
|
||||
date: 2026-01-25
|
||||
description: Sample article showcasing basic Markdown syntax and formatting for HTML elements.
|
||||
tags:
|
||||
- markdown
|
||||
- css
|
||||
- html
|
||||
- themes
|
||||
categories:
|
||||
- Documentation
|
||||
image: pawel-czerwinski-8uZPynIu-rQ-unsplash.jpg
|
||||
---
|
||||
|
||||
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
## H2
|
||||
### H3
|
||||
#### H4
|
||||
##### H5
|
||||
@@ -42,12 +35,12 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
|
||||
|
||||
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
|
||||
|
||||
#### Blockquote without attribution
|
||||
### Blockquote without attribution
|
||||
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **Note** that you can use *Markdown syntax* within a blockquote.
|
||||
|
||||
#### Blockquote with attribution
|
||||
### Blockquote with attribution
|
||||
|
||||
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
@@ -58,24 +51,23 @@ The blockquote element represents content that is quoted from another source, op
|
||||
|
||||
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
|
||||
|
||||
Name | Age
|
||||
--------|------
|
||||
Bob | 27
|
||||
Alice | 23
|
||||
| Name | Age |
|
||||
| ----- | --- |
|
||||
| Bob | 27 |
|
||||
| Alice | 23 |
|
||||
|
||||
#### Inline Markdown within tables
|
||||
### Inline Markdown within tables
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| -------- | -------- | ------ |
|
||||
| --------- | -------- | ------ |
|
||||
| *italics* | **bold** | `code` |
|
||||
|
||||
| A | B | C | D | E | F |
|
||||
|----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|------------------------------------------------------------|----------------------------------------------------------------------|
|
||||
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. | Phasellus ultricies, sapien non euismod aliquam, dui ligula tincidunt odio, at accumsan nulla sapien eget ex. | Proin eleifend dictum ipsum, non euismod ipsum pulvinar et. Vivamus sollicitudin, quam in pulvinar aliquam, metus elit pretium purus | Proin sit amet velit nec enim imperdiet vehicula. | Ut bibendum vestibulum quam, eu egestas turpis gravida nec | Sed scelerisque nec turpis vel viverra. Vivamus vitae pretium sapien |
|
||||
|
||||
## Code Blocks
|
||||
|
||||
#### Code block with backticks
|
||||
### Code block with backticks
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
@@ -90,7 +82,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
</html>
|
||||
```
|
||||
|
||||
#### Code block indented with four spaces
|
||||
### Code block indented with four spaces
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
@@ -103,21 +95,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
|
||||
</body>
|
||||
</html>
|
||||
|
||||
#### Code block with Hugo's internal highlight shortcode
|
||||
{{< highlight html >}}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
|
||||
#### Diff code block
|
||||
### Diff code block
|
||||
|
||||
```diff
|
||||
[dependencies.bevy]
|
||||
@@ -127,21 +105,27 @@ rev = "11f52b8c72fc3a568e8bb4a4cd1f3eb025ac2e13"
|
||||
+ features = ["jpeg", "dynamic"]
|
||||
```
|
||||
|
||||
### One line code block
|
||||
|
||||
```html
|
||||
<p>A paragraph</p>
|
||||
```
|
||||
|
||||
## List Types
|
||||
|
||||
#### Ordered List
|
||||
### Ordered List
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
#### Unordered List
|
||||
### Unordered List
|
||||
|
||||
* List item
|
||||
* Another item
|
||||
* And another item
|
||||
|
||||
#### Nested list
|
||||
### Nested list
|
||||
|
||||
* Fruit
|
||||
* Apple
|
||||
@@ -161,8 +145,4 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
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.
|
||||
|
||||
## Hyperlinked image
|
||||
|
||||
[](https://google.com)
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
||||
@@ -0,0 +1,148 @@
|
||||
---
|
||||
title: Markdown 语法指南
|
||||
date: 2026-01-25
|
||||
description: 展示基本 Markdown 语法和 HTML 元素格式的示例文章。
|
||||
tags:
|
||||
- markdown
|
||||
- css
|
||||
- html
|
||||
- themes
|
||||
categories:
|
||||
- Documentation
|
||||
image: pawel-czerwinski-8uZPynIu-rQ-unsplash.jpg
|
||||
---
|
||||
|
||||
这篇文章提供了可以在 Hugo 内容文件中使用的基本 Markdown 语法示例,同时也展示了 Hugo 主题中基本 HTML 元素是否应用了 CSS 装饰。
|
||||
|
||||
<!--more-->
|
||||
|
||||
## 标题 (Headings)
|
||||
|
||||
以下 HTML `<h1>`—`<h6>` 元素代表了六个级别的章节标题。`<h1>` 是最高级别,而 `<h6>` 是最低级别。
|
||||
|
||||
### H3
|
||||
#### H4
|
||||
##### H5
|
||||
###### H6
|
||||
|
||||
## 段落 (Paragraph)
|
||||
|
||||
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
|
||||
|
||||
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||
|
||||
## 引用 (Blockquotes)
|
||||
|
||||
引用元素代表从另一个来源引用的内容,可以选择带有引用说明(必须在 `footer` 或 `cite` 元素内),也可以选择带有行内更改(如注释和缩写)。
|
||||
|
||||
### 不带出处的引用
|
||||
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **注意**:你可以在引用中使用 *Markdown 语法*。
|
||||
|
||||
### 带有出处的引用
|
||||
|
||||
> 不要通过共享内存来通信,而要通过通信来共享内存。<br>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
|
||||
[^1]: 以上引用摘自 Rob Pike 在 2015 年 11 月 18 日 Gopherfest 期间的[演讲](https://www.youtube.com/watch?v=PAAkCSZUG1c)。
|
||||
|
||||
## 表格 (Tables)
|
||||
|
||||
表格虽然不是 Markdown 核心规范的一部分,但 Hugo 出箱即用地支持它们。
|
||||
|
||||
| 姓名 | 年龄 |
|
||||
| ----- | ---- |
|
||||
| Bob | 27 |
|
||||
| Alice | 23 |
|
||||
|
||||
### 表格内的行内 Markdown
|
||||
|
||||
| 斜体 | 加粗 | 代码 |
|
||||
| --------- | -------- | ------ |
|
||||
| *italics* | **bold** | `code` |
|
||||
|
||||
| A | B | C | D | E | F |
|
||||
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. | Phasellus ultricies, sapien non euismod aliquam, dui ligula tincidunt odio, at accumsan nulla sapien eget ex. | Proin eleifend dictum ipsum, non euismod ipsum pulvinar et. Vivamus sollicitudin, quam in pulvinar aliquam, metus elit pretium purus | Proin sit amet velit nec enim imperdiet vehicula. | Ut bibendum vestibulum quam, eu egestas turpis gravida nec | Sed scelerisque nec turpis vel viverra. Vivamus vitae pretium sapien |
|
||||
|
||||
## 代码块 (Code Blocks)
|
||||
### 使用反引号的代码块
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### 使用四个空格缩进的代码块
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
### Diff 代码块
|
||||
|
||||
```diff
|
||||
[dependencies.bevy]
|
||||
git = "https://github.com/bevyengine/bevy"
|
||||
rev = "11f52b8c72fc3a568e8bb4a4cd1f3eb025ac2e13"
|
||||
- features = ["dynamic"]
|
||||
+ features = ["jpeg", "dynamic"]
|
||||
```
|
||||
|
||||
### 单行代码块
|
||||
|
||||
```html
|
||||
<p>A paragraph</p>
|
||||
```
|
||||
|
||||
## 列表类型 (List Types)
|
||||
|
||||
### 有序列表
|
||||
|
||||
1. 第一项
|
||||
2. 第二项
|
||||
3. 第三项
|
||||
|
||||
### 无序列表
|
||||
|
||||
* 列表项
|
||||
* 另一项
|
||||
* 还有一项
|
||||
|
||||
### 嵌套列表
|
||||
|
||||
* 水果
|
||||
* 苹果
|
||||
* 橘子
|
||||
* 香蕉
|
||||
* 乳制品
|
||||
* 牛奶
|
||||
* 奶酪
|
||||
|
||||
## 其他元素 — abbr, sub, sup, kbd, mark
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> 是一种位图图像格式。
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
按 <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> 结束会话。
|
||||
|
||||
大多数<mark>蝾螈</mark>是夜行性的,捕食昆虫、蠕虫和其他小型生物。
|
||||
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
@@ -0,0 +1,61 @@
|
||||
---
|
||||
title: Math Typesetting
|
||||
date: 2026-01-24
|
||||
description: Guide to enabling and using KaTeX in the Stack theme
|
||||
math: true
|
||||
categories:
|
||||
- Documentation
|
||||
slug: math-typesetting
|
||||
---
|
||||
|
||||
The Stack theme supports rendering mathematical notation using [KaTeX](https://katex.org/).
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Enabling KaTeX
|
||||
|
||||
### Per-page basis
|
||||
|
||||
To enable KaTeX for a specific post, include `math: true` in the post's frontmatter:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "My Math Post"
|
||||
math: true
|
||||
---
|
||||
```
|
||||
|
||||
### Globally
|
||||
|
||||
To enable KaTeX for all posts, set `article.math` to `true` in your site configuration (`params.yaml` or `params.toml`):
|
||||
|
||||
```yaml
|
||||
article:
|
||||
math: true
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Inline Math
|
||||
|
||||
You can include math inline by wrapping the expression in single dollar signs `$`.
|
||||
|
||||
For example: `$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $` renders as $ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $
|
||||
|
||||
### Block Math
|
||||
|
||||
For larger equations, use double dollar signs `$$` to create a math block.
|
||||
|
||||
$$
|
||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||
$$
|
||||
|
||||
### More Complex Formula
|
||||
|
||||
$$
|
||||
f(a) = \frac{1}{2\pi i} \oint_\gamma \frac{f(z)}{z-a} dz
|
||||
$$
|
||||
|
||||
---
|
||||
|
||||
**Note:** For a full list of supported TeX functions, refer to the [KaTeX documentation](https://katex.org/docs/supported.html).
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
title: 数学公式
|
||||
date: 2026-01-24
|
||||
description: 在 Stack 主题中启用和使用 KaTeX 的指南
|
||||
math: true
|
||||
categories:
|
||||
- Documentation
|
||||
slug: math-typesetting
|
||||
---
|
||||
|
||||
Stack 主题支持使用 [KaTeX](https://katex.org/) 渲染数学公式。
|
||||
|
||||
<!--more-->
|
||||
|
||||
## 启用 KaTeX
|
||||
|
||||
### 按页面启用
|
||||
|
||||
要在特定文章中启用 KaTeX,请在文章的前置参数(frontmatter)中包含 `math: true`:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "我的数学文章"
|
||||
math: true
|
||||
---
|
||||
```
|
||||
|
||||
### 全局启用
|
||||
|
||||
要为所有文章启用 KaTeX,请在网站配置(`params.yaml` 或 `params.toml`)中将 `article.math` 设置为 `true`:
|
||||
|
||||
```yaml
|
||||
article:
|
||||
math: true
|
||||
```
|
||||
|
||||
## 示例
|
||||
|
||||
### 行内公式
|
||||
|
||||
你可以通过将表达式包裹在单个美元符号 `$` 中来包含行内公式。
|
||||
|
||||
例如:`$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $` 将渲染为 $ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $
|
||||
|
||||
### 块级公式
|
||||
|
||||
对于较大的方程式,请使用双美元符号 `$$` 创建数学块。
|
||||
|
||||
$$
|
||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||
$$
|
||||
|
||||
### 更复杂的公式
|
||||
|
||||
$$
|
||||
f(a) = \frac{1}{2\pi i} \oint_\gamma \frac{f(z)}{z-a} dz
|
||||
$$
|
||||
|
||||
---
|
||||
|
||||
**注意:** 有关受支持的 TeX 函数的完整列表,请参阅 [KaTeX 文档](https://katex.org/docs/supported.html)。
|
||||
@@ -0,0 +1,119 @@
|
||||
---
|
||||
title: ショートコード
|
||||
date: 2026-01-26
|
||||
description: Stack テーマでサポートされているさまざまなショートコードを紹介します。
|
||||
categories:
|
||||
- Documentation
|
||||
tags:
|
||||
- 隐私
|
||||
---
|
||||
|
||||
Stack テーマには、コンテンツを強化するためのカスタムショートコードがいくつか用意されています。
|
||||
|
||||
<!--more-->
|
||||
|
||||
## 引用 (Quote)
|
||||
|
||||
`quote` ショートコードを使用すると、著者、出典、URL を含む引用を表示できます。
|
||||
|
||||
{{< quote author="有名な人" source="彼らが書いた本" url="https://ja.wikipedia.org/wiki/Book">}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
{{< /quote >}}
|
||||
|
||||
### 使い方
|
||||
|
||||
```markdown
|
||||
{{</* quote author="著者名" source="出典タイトル" url="https://example.com" */>}}
|
||||
ここに引用内容を入力します。
|
||||
{{</* /quote */>}}
|
||||
```
|
||||
|
||||
|
||||
## ビデオ (Video)
|
||||
|
||||
`video` ショートコードを使用すると、セルフホストまたはリモートのビデオファイルを埋め込むことができます。
|
||||
|
||||
{{< video src="https://www.w3schools.com/html/mov_bbb.mp4" >}}
|
||||
|
||||
### 使い方
|
||||
|
||||
```markdown
|
||||
{{</* video src="https://example.com/video.mp4" */>}}
|
||||
```
|
||||
|
||||
|
||||
## Bilibili
|
||||
|
||||
Bilibili からビデオを埋め込みます。`av` および `bv` ID の両方をサポートしています。
|
||||
|
||||
{{< bilibili "BV1634y1t7xR" >}}
|
||||
|
||||
### 使い方
|
||||
|
||||
```markdown
|
||||
{{</* bilibili "BV1634y1t7xR" */>}}
|
||||
```
|
||||
|
||||
|
||||
## YouTube
|
||||
|
||||
Hugo 内蔵の YouTube ショートコードです。
|
||||
|
||||
{{< youtube ZJthWmvUzzc >}}
|
||||
|
||||
### 使い方
|
||||
|
||||
```markdown
|
||||
{{</* youtube ZJthWmvUzzc */>}}
|
||||
```
|
||||
|
||||
|
||||
## 騰訊視頻 (Tencent Video)
|
||||
|
||||
Tencent Video からビデオを埋め込みます。
|
||||
|
||||
{{< tencent "u00306ng962" >}}
|
||||
|
||||
### 使い方
|
||||
|
||||
```markdown
|
||||
{{</* tencent "u00306ng962" */>}}
|
||||
```
|
||||
|
||||
|
||||
## GitLab Snippet
|
||||
|
||||
GitLab からスニペットを埋め込みます。
|
||||
|
||||
{{< gitlab 2349278 >}}
|
||||
|
||||
### 使い方
|
||||
|
||||
```markdown
|
||||
{{</* gitlab 2349278 */>}}
|
||||
```
|
||||
|
||||
|
||||
## 図表 (Diagrams)
|
||||
|
||||
Stack は [Mermaid](https://mermaid.js.org/) 図表を標準でサポートしています。
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```
|
||||
|
||||
### 使い方
|
||||
|
||||
Mermaid コードを、言語を `mermaid` に設定したコードブロックで囲みます。
|
||||
|
||||
<pre><code>```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```</code></pre>
|
||||
@@ -0,0 +1,116 @@
|
||||
---
|
||||
title: Shortcodes
|
||||
date: 2026-01-26
|
||||
description: Sample article showcasing various shortcodes supported by Stack theme.
|
||||
categories:
|
||||
- Documentation
|
||||
tags:
|
||||
- shortcodes
|
||||
- privacy
|
||||
---
|
||||
|
||||
Stack theme also provides some custom shortcodes to enhance your content.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Quote
|
||||
|
||||
The `quote` shortcode allows you to display a quote with an author, source, and URL.
|
||||
|
||||
{{< quote author="A famous person" source="The book they wrote" url="https://en.wikipedia.org/wiki/Book">}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
{{< /quote >}}
|
||||
|
||||
### Usage
|
||||
|
||||
```markdown
|
||||
{{</* quote author="Author Name" source="Source Title" url="https://example.com" */>}}
|
||||
Quote content here.
|
||||
{{</* /quote */>}}
|
||||
```
|
||||
|
||||
## Video
|
||||
|
||||
The `video` shortcode allows you to embed self-hosted or remote video files.
|
||||
|
||||
{{< video src="https://www.w3schools.com/html/mov_bbb.mp4" >}}
|
||||
|
||||
### Usage
|
||||
|
||||
```markdown
|
||||
{{</* video src="https://example.com/video.mp4" */>}}
|
||||
```
|
||||
|
||||
## Bilibili
|
||||
|
||||
Embed videos from Bilibili. Supports both `av` and `bv` IDs.
|
||||
|
||||
{{< bilibili "BV1634y1t7xR" >}}
|
||||
|
||||
### Usage
|
||||
|
||||
```markdown
|
||||
{{</* bilibili "BV1634y1t7xR" */>}}
|
||||
```
|
||||
|
||||
## YouTube
|
||||
|
||||
Hugo's built-in YouTube shortcode.
|
||||
|
||||
{{< youtube ZJthWmvUzzc >}}
|
||||
|
||||
### Usage
|
||||
|
||||
```markdown
|
||||
{{</* youtube ZJthWmvUzzc */>}}
|
||||
```
|
||||
|
||||
## Tencent Video
|
||||
|
||||
Embed videos from Tencent Video.
|
||||
|
||||
{{< tencent "u00306ng962" >}}
|
||||
|
||||
### Usage
|
||||
|
||||
```markdown
|
||||
{{</* tencent "u00306ng962" */>}}
|
||||
```
|
||||
|
||||
## GitLab Snippet
|
||||
|
||||
Embed snippets from GitLab.
|
||||
|
||||
{{< gitlab 2349278 >}}
|
||||
|
||||
### Usage
|
||||
|
||||
```markdown
|
||||
{{</* gitlab 2349278 */>}}
|
||||
```
|
||||
|
||||
## Diagrams
|
||||
|
||||
Stack supports [Mermaid](https://mermaid.js.org/) diagrams out of the box.
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
Wrap your Mermaid code in a code block with the language set to `mermaid`.
|
||||
|
||||
<pre><code>```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```</code></pre>
|
||||
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
---
|
||||
title: 短代碼
|
||||
date: 2026-01-26
|
||||
description: 展示 Stack 主題支持的各種短代碼。
|
||||
categories:
|
||||
- Documentation
|
||||
tags:
|
||||
- 隐私
|
||||
---
|
||||
|
||||
Stack 主題還提供了一些自定義短代碼來增強你的內容。
|
||||
|
||||
<!--more-->
|
||||
|
||||
## 引用 (Quote)
|
||||
|
||||
`quote` 短代碼允許你顯示帶有作者、來源和 URL 的引用。
|
||||
|
||||
{{< quote author="一位名人" source="他們寫的書" url="https://zh.wikipedia.org/wiki/Book">}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
{{< /quote >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* quote author="作者名字" source="文章標題" url="https://example.com" */>}}
|
||||
這裡是引用內容。
|
||||
{{</* /quote */>}}
|
||||
```
|
||||
|
||||
## 視頻 (Video)
|
||||
|
||||
`video` 短代碼允許你嵌入自託管或遠程視頻文件。
|
||||
|
||||
{{< video src="https://www.w3schools.com/html/mov_bbb.mp4" >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* video src="https://example.com/video.mp4" */>}}
|
||||
```
|
||||
|
||||
## Bilibili
|
||||
|
||||
嵌入來自 Bilibili 的視頻。支持 `av` 和 `bv` 號。
|
||||
|
||||
{{< bilibili "BV1634y1t7xR" >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* bilibili "BV1634y1t7xR" */>}}
|
||||
```
|
||||
|
||||
## YouTube
|
||||
|
||||
Hugo 內置的 YouTube 短代碼。
|
||||
|
||||
{{< youtube ZJthWmvUzzc >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* youtube ZJthWmvUzzc */>}}
|
||||
```
|
||||
|
||||
|
||||
## 騰訊視頻 (Tencent Video)
|
||||
|
||||
嵌入來自騰訊視頻的視頻。
|
||||
|
||||
{{< tencent "u00306ng962" >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* tencent "u00306ng962" */>}}
|
||||
```
|
||||
|
||||
|
||||
## GitLab Snippet
|
||||
|
||||
嵌入來自 GitLab 的代碼片段。
|
||||
|
||||
{{< gitlab 2349278 >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* gitlab 2349278 */>}}
|
||||
```
|
||||
|
||||
|
||||
## 圖表 (Diagrams)
|
||||
|
||||
Stack 出箱即用地支持 [Mermaid](https://mermaid.js.org/) 圖表。
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```
|
||||
|
||||
### 用法
|
||||
|
||||
將你的 Mermaid 代碼包裹在語言設置為 `mermaid` 的代碼塊中。
|
||||
|
||||
<pre><code>```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```</code></pre>
|
||||
@@ -0,0 +1,113 @@
|
||||
---
|
||||
title: 短代码
|
||||
date: 2026-01-26
|
||||
description: 展示 Stack 主题支持的各种短代码。
|
||||
categories:
|
||||
- Documentation
|
||||
tags:
|
||||
- 隐私
|
||||
---
|
||||
|
||||
Stack 主题还提供了一些自定义短代码来增强你的内容。
|
||||
|
||||
<!--more-->
|
||||
|
||||
## 引用 (Quote)
|
||||
|
||||
`quote` 短代码允许你显示带有作者、来源和 URL 的引用。
|
||||
|
||||
{{< quote author="一位名人" source="他们写的书" url="https://zh.wikipedia.org/wiki/Book">}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
{{< /quote >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* quote author="作者名字" source="文章标题" url="https://example.com" */>}}
|
||||
这里是引用内容。
|
||||
{{</* /quote */>}}
|
||||
```
|
||||
|
||||
## 视频 (Video)
|
||||
|
||||
`video` 短代码允许你嵌入自托管或远程视频文件。
|
||||
|
||||
{{< video src="https://www.w3schools.com/html/mov_bbb.mp4" >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* video src="https://example.com/video.mp4" */>}}
|
||||
```
|
||||
|
||||
## Bilibili
|
||||
|
||||
嵌入来自 Bilibili 的视频。支持 `av` 和 `bv` 号。
|
||||
|
||||
{{< bilibili "BV1634y1t7xR" >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* bilibili "BV1634y1t7xR" */>}}
|
||||
```
|
||||
|
||||
## YouTube
|
||||
|
||||
Hugo 内置的 YouTube 短代码。
|
||||
|
||||
{{< youtube ZJthWmvUzzc >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* youtube ZJthWmvUzzc */>}}
|
||||
```
|
||||
|
||||
## 腾讯视频 (Tencent Video)
|
||||
|
||||
嵌入来自腾讯视频的视频。
|
||||
|
||||
{{< tencent "u00306ng962" >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* tencent "u00306ng962" */>}}
|
||||
```
|
||||
|
||||
## GitLab Snippet
|
||||
|
||||
嵌入来自 GitLab 的代码片段。
|
||||
|
||||
{{< gitlab 2349278 >}}
|
||||
|
||||
### 用法
|
||||
|
||||
```markdown
|
||||
{{</* gitlab 2349278 */>}}
|
||||
```
|
||||
|
||||
## 图表 (Diagrams)
|
||||
|
||||
Stack 出箱即用地支持 [Mermaid](https://mermaid.js.org/) 图表。
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```
|
||||
|
||||
### 用法
|
||||
|
||||
将你的 Mermaid 代码包裹在语言设置为 `mermaid` 的代码块中。
|
||||
|
||||
<pre><code>```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```</code></pre>
|
||||
@@ -0,0 +1,7 @@
|
||||
module github.com/CaiJimmy/hugo-theme-stack/demo
|
||||
|
||||
go 1.25.6
|
||||
|
||||
replace github.com/CaiJimmy/hugo-theme-stack/v3 => ../
|
||||
|
||||
require github.com/CaiJimmy/hugo-theme-stack/v3 v3.34.0 // indirect
|
||||
@@ -0,0 +1 @@
|
||||
hugo server --gc --themesDir=../..
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
title: About
|
||||
description: Hugo, the world's fastest framework for building websites
|
||||
date: '2019-02-28'
|
||||
aliases:
|
||||
- about-us
|
||||
- about-hugo
|
||||
- contact
|
||||
license: CC BY-NC-ND
|
||||
lastmod: '2020-10-09'
|
||||
menu:
|
||||
main:
|
||||
weight: -90
|
||||
params:
|
||||
icon: user
|
||||
---
|
||||
|
||||
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:
|
||||
|
||||
* https://github.com/yuin/goldmark
|
||||
* https://github.com/alecthomas/chroma
|
||||
* https://github.com/muesli/smartcrop
|
||||
* https://github.com/spf13/cobra
|
||||
* https://github.com/spf13/viper
|
||||
|
||||
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
|
||||
|
||||
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 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).
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: 关于
|
||||
menu:
|
||||
main:
|
||||
weight: -90
|
||||
params:
|
||||
icon: user
|
||||
---
|
||||
|
||||
This is a test page for i18n support.
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: Chinese Test
|
||||
description: 这是一个副标题
|
||||
date: 2020-09-09
|
||||
slug: test-chinese
|
||||
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||
categories:
|
||||
- Test
|
||||
- 测试
|
||||
---
|
||||
|
||||
## 正文测试
|
||||
|
||||
而这些并不是完全重要,更加重要的问题是, 带着这些问题,我们来审视一下学生会退会。 既然如何, 对我个人而言,学生会退会不仅仅是一个重大的事件,还可能会改变我的人生。 我们不得不面对一个非常尴尬的事实,那就是, 可是,即使是这样,学生会退会的出现仍然代表了一定的意义。 学生会退会,发生了会如何,不发生又会如何。 经过上述讨论, 生活中,若学生会退会出现了,我们就不得不考虑它出现了的事实。 学生会退会,到底应该如何实现。 这样看来, 在这种困难的抉择下,本人思来想去,寝食难安。 对我个人而言,学生会退会不仅仅是一个重大的事件,还可能会改变我的人生。 就我个人来说,学生会退会对我的意义,不能不说非常重大。 莎士比亚曾经提到过,人的一生是短的,但如果卑劣地过这一生,就太长了。这似乎解答了我的疑惑。 莫扎特说过一句富有哲理的话,谁和我一样用功,谁就会和我一样成功。这启发了我, 对我个人而言,学生会退会不仅仅是一个重大的事件,还可能会改变我的人生。 学生会退会,到底应该如何实现。 一般来说, 从这个角度来看, 这种事实对本人来说意义重大,相信对这个世界也是有一定意义的。 在这种困难的抉择下,本人思来想去,寝食难安。 了解清楚学生会退会到底是一种怎么样的存在,是解决一切问题的关键。 一般来说, 生活中,若学生会退会出现了,我们就不得不考虑它出现了的事实。 问题的关键究竟为何? 而这些并不是完全重要,更加重要的问题是。
|
||||
|
||||
奥斯特洛夫斯基曾经说过,共同的事业,共同的斗争,可以使人们产生忍受一切的力量。 带着这句话,我们还要更加慎重的审视这个问题: 一般来讲,我们都必须务必慎重的考虑考虑。 既然如此, 这种事实对本人来说意义重大,相信对这个世界也是有一定意义的。 带着这些问题,我们来审视一下学生会退会。 我认为, 我认为, 在这种困难的抉择下,本人思来想去,寝食难安。 问题的关键究竟为何? 每个人都不得不面对这些问题。 在面对这种问题时, 要想清楚,学生会退会,到底是一种怎么样的存在。 我认为, 既然如此, 每个人都不得不面对这些问题。 在面对这种问题时, 那么, 我认为, 学生会退会因何而发生。
|
||||
|
||||
## 引用
|
||||
|
||||
> 思念是最暖的忧伤像一双翅膀
|
||||
> 让我停不了飞不远在过往游荡
|
||||
> 不告而别的你 就算为了我着想
|
||||
> 这么沉痛的呵护 我怎么能翱翔
|
||||
>
|
||||
> *[最暖的憂傷 - 田馥甄](https://www.youtube.com/watch?v=3aypp_YlBzI)*
|
||||
|
||||
## 图片
|
||||
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
```markdown
|
||||
 
|
||||
|
||||
 
|
||||
```
|
||||
|
||||
相册语法来自 [Typlog](https://typlog.com/)
|
||||
@@ -1,50 +0,0 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Emoji Support"
|
||||
date = "2019-03-05"
|
||||
description = "Guide to emoji usage in Hugo"
|
||||
categories = [
|
||||
"Test"
|
||||
]
|
||||
tags = [
|
||||
"emoji",
|
||||
]
|
||||
image = "the-creative-exchange-d2zvqp3fpro-unsplash.jpg"
|
||||
+++
|
||||
|
||||
Emoji can be enabled in a Hugo project in a number of ways.
|
||||
<!--more-->
|
||||
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
|
||||
|
||||
To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
|
||||
|
||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||
<br>
|
||||
|
||||
The [Emoji cheat sheet](https://www.webfx.com/tools/emoji-cheat-sheet/) is a useful reference for emoji shorthand codes.
|
||||
|
||||
***
|
||||
|
||||
**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
|
||||
|
||||
{{< highlight html >}}
|
||||
.emoji {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
}
|
||||
{{< /highlight >}}
|
||||
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.emojify {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
font-size: 2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@media screen and (max-width:650px) {
|
||||
.nowrap {
|
||||
display: block;
|
||||
margin: 25px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{{< /css.inline >}}
|
||||
|
Before Width: | Height: | Size: 34 KiB |
@@ -1,45 +0,0 @@
|
||||
---
|
||||
author: Hugo Authors
|
||||
title: Math Typesetting
|
||||
date: 2019-03-08
|
||||
description: A brief guide to setup KaTeX
|
||||
math: true
|
||||
---
|
||||
|
||||
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
|
||||
<!--more-->
|
||||
|
||||
In this example we will be using [KaTeX](https://katex.org/)
|
||||
|
||||
- Create a partial under `/layouts/partials/math.html`
|
||||
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
|
||||
- Include the partial in your templates like so:
|
||||
|
||||
```bash
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ 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
|
||||
|
||||
**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.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
|
||||
|
||||
Inline math: $\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…$
|
||||
|
||||
Block math:
|
||||
$$
|
||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||
$$
|
||||
@@ -1,32 +0,0 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "مثال نص"
|
||||
date = "2019-03-09"
|
||||
description = "هذا النص هو مثال لنص يمكن أن يستبدل في نفس المساحة"
|
||||
categories = [
|
||||
"تجربة",
|
||||
"تجربة مع فراغات"
|
||||
]
|
||||
tags = [
|
||||
"ماركداون",
|
||||
"نص",
|
||||
"وسم مع فراغات"
|
||||
]
|
||||
image = "matt-le-SJSpo9hQf7s-unsplash.jpg"
|
||||
+++
|
||||
## فقرة 1
|
||||
|
||||
هذا النص هو مثال لنص يمكن أن يستبدل في نفس المساحة، لقد تم توليد هذا النص من [مولد النص العربى](https://colorslab.com/textgator/)، حيث يمكنك أن تولد مثل هذا النص أو العديد من النصوص الأخرى إضافة إلى زيادة عدد الحروف التى يولدها التطبيق.
|
||||
إذا كنت تحتاج إلى عدد أكبر من الفقرات يتيح لك مولد النص العربى زيادة عدد الفقرات كما تريد، النص لن يبدو مقسما ولا يحوي أخطاء لغوية، مولد النص العربى مفيد لمصممي المواقع على وجه الخصوص، حيث يحتاج العميل فى كثير من الأحيان أن يطلع على صورة حقيقية لتصميم الموقع.
|
||||
ومن هنا وجب على المصمم أن يضع نصوصا مؤقتة على التصميم ليظهر للعميل الشكل كاملاً،دور مولد النص العربى أن يوفر على المصمم عناء البحث عن نص بديل لا علاقة له بالموضوع الذى يتحدث عنه التصميم فيظهر بشكل لا يليق.
|
||||
هذا النص يمكن أن يتم تركيبه على أي تصميم دون مشكلة فلن يبدو وكأنه نص منسوخ، غير منظم، غير منسق، أو حتى غير مفهوم. لأنه مازال نصاً بديلاً ومؤقتاً.
|
||||
|
||||
## فقرة 2
|
||||
|
||||
هذا النص هو مثال لنص يمكن أن يستبدل في نفس المساحة، لقد تم توليد هذا النص من [مولد النص العربى](https://colorslab.com/textgator/)، حيث يمكنك أن تولد مثل هذا النص أو العديد من النصوص الأخرى إضافة إلى زيادة عدد الحروف التى يولدها التطبيق.
|
||||
إذا كنت تحتاج إلى عدد أكبر من الفقرات يتيح لك مولد النص العربى زيادة عدد الفقرات كما تريد، النص لن يبدو مقسما ولا يحوي أخطاء لغوية، مولد النص العربى مفيد لمصممي المواقع على وجه الخصوص، حيث يحتاج العميل فى كثير من الأحيان أن يطلع على صورة حقيقية لتصميم الموقع.
|
||||
ومن هنا وجب على المصمم أن يضع نصوصا مؤقتة على التصميم ليظهر للعميل الشكل كاملاً،دور مولد النص العربى أن يوفر على المصمم عناء البحث عن نص بديل لا علاقة له بالموضوع الذى يتحدث عنه التصميم فيظهر بشكل لا يليق.
|
||||
هذا النص يمكن أن يتم تركيبه على أي تصميم دون مشكلة فلن يبدو وكأنه نص منسوخ، غير منظم، غير منسق، أو حتى غير مفهوم. لأنه مازال نصاً بديلاً ومؤقتاً.
|
||||
|
||||
## تجربة RTL
|
||||
كلمة 1 Text كلمة 2
|
||||
@@ -1,51 +0,0 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Placeholder Text"
|
||||
date = "2019-03-09"
|
||||
description = "Lorem Ipsum Dolor Si Amet"
|
||||
categories = [
|
||||
"Test",
|
||||
"Test with whitespaces"
|
||||
]
|
||||
tags = [
|
||||
"markdown",
|
||||
"text",
|
||||
"tag with whitespaces"
|
||||
]
|
||||
image = "matt-le-SJSpo9hQf7s-unsplash.jpg"
|
||||
+++
|
||||
|
||||
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
|
||||
|
||||
1. Exierant elisi ambit vivere dedere
|
||||
2. Duce pollice
|
||||
3. Eris modo
|
||||
4. Spargitque ferrea quos palude
|
||||
|
||||
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
|
||||
|
||||
1. Comas hunc haec pietate fetum procerum dixit
|
||||
2. Post torum vates letum Tiresia
|
||||
3. Flumen querellas
|
||||
4. Arcanaque montibus omnes
|
||||
5. Quidem et
|
||||
|
||||
# Vagus elidunt
|
||||
|
||||
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||
|
||||
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
|
||||
|
||||
## Mane refeci capiebant unda mulcebat
|
||||
|
||||
Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
|
||||
|
||||
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
|
||||
|
||||
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
|
||||
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.canon { background: white; width: 100%; height: auto; }
|
||||
</style>
|
||||
{{< /css.inline >}}
|
||||
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,63 +0,0 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Rich Content"
|
||||
date = "2019-03-10"
|
||||
description = "A brief description of Hugo Shortcodes"
|
||||
tags = [
|
||||
"shortcodes",
|
||||
"privacy",
|
||||
]
|
||||
+++
|
||||
|
||||
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
|
||||
<!--more-->
|
||||
---
|
||||
|
||||
## YouTube Privacy Enhanced Shortcode
|
||||
|
||||
{{< youtube ZJthWmvUzzc >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## X Simple Shortcode
|
||||
|
||||
{{< x user="DesignReviewed" id="1085870671291310081" >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Vimeo Simple Shortcode
|
||||
|
||||
{{< vimeo_simple 48912912 >}}
|
||||
|
||||
## bilibilibi Shortcode
|
||||
|
||||
{{< bilibili av498363026 >}}
|
||||
|
||||
## Gitlab Snippets Shortcode
|
||||
|
||||
{{< gitlab 2349278 >}}
|
||||
|
||||
## Quote Shortcode
|
||||
|
||||
Stack adds a `quote` shortcode. For example:
|
||||
|
||||
{{< quote author="A famous person" source="The book they wrote" url="https://en.wikipedia.org/wiki/Book">}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
{{< /quote >}}
|
||||
|
||||
{{< quote source="Anonymous book" url="https://en.wikipedia.org/wiki/Book">}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
{{< /quote >}}
|
||||
|
||||
{{< quote source="Some book">}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
{{< /quote >}}
|
||||
|
||||
{{< quote author="Somebody">}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
{{< /quote >}}
|
||||
|
||||
@@ -1,269 +0,0 @@
|
||||
baseurl: https://example.com/
|
||||
languageCode: en-us
|
||||
theme: hugo-theme-stack
|
||||
title: Example Site
|
||||
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
|
||||
DefaultContentLanguage: en
|
||||
|
||||
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
|
||||
# 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/
|
||||
|
||||
params:
|
||||
mainSections:
|
||||
- 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)
|
||||
|
||||
footer:
|
||||
since: 2020
|
||||
customText:
|
||||
|
||||
dateFormat:
|
||||
published: Jan 02, 2006
|
||||
lastUpdated: Jan 02, 2006 15:04 MST
|
||||
|
||||
sidebar:
|
||||
emoji: 🍥
|
||||
subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
avatar:
|
||||
enabled: true
|
||||
local: true
|
||||
src: img/avatar.png
|
||||
|
||||
article:
|
||||
math: false
|
||||
toc: true
|
||||
readingTime: true
|
||||
license:
|
||||
enabled: true
|
||||
default: Licensed under CC BY-NC-SA 4.0
|
||||
|
||||
comments:
|
||||
enabled: true
|
||||
provider: disqus
|
||||
|
||||
disqusjs:
|
||||
shortname:
|
||||
apiUrl:
|
||||
apiKey:
|
||||
admin:
|
||||
adminLabel:
|
||||
|
||||
utterances:
|
||||
repo:
|
||||
issueTerm: pathname
|
||||
label:
|
||||
|
||||
beaudar:
|
||||
repo:
|
||||
issueTerm: pathname
|
||||
label:
|
||||
theme:
|
||||
|
||||
remark42:
|
||||
host:
|
||||
site:
|
||||
locale:
|
||||
|
||||
vssue:
|
||||
platform:
|
||||
owner:
|
||||
repo:
|
||||
clientId:
|
||||
clientSecret:
|
||||
autoCreateIssue: false
|
||||
|
||||
# Waline client configuration see: https://waline.js.org/en/reference/component.html
|
||||
waline:
|
||||
serverURL:
|
||||
lang:
|
||||
pageview:
|
||||
emoji:
|
||||
- https://unpkg.com/@waline/emojis@1.0.1/weibo
|
||||
requiredMeta:
|
||||
- name
|
||||
- email
|
||||
- url
|
||||
locale:
|
||||
admin: Admin
|
||||
placeholder:
|
||||
|
||||
twikoo:
|
||||
envId:
|
||||
region:
|
||||
path:
|
||||
lang:
|
||||
|
||||
# See https://cactus.chat/docs/reference/web-client/#configuration for description of the various options
|
||||
cactus:
|
||||
defaultHomeserverUrl: "https://matrix.cactus.chat:8448"
|
||||
serverName: "cactus.chat"
|
||||
siteName: "" # You must insert a unique identifier here matching the one you registered (See https://cactus.chat/docs/getting-started/quick-start/#register-your-site)
|
||||
|
||||
giscus:
|
||||
repo:
|
||||
repoID:
|
||||
category:
|
||||
categoryID:
|
||||
mapping:
|
||||
lightTheme:
|
||||
darkTheme:
|
||||
reactionsEnabled: 1
|
||||
emitMetadata: 0
|
||||
|
||||
gitalk:
|
||||
owner:
|
||||
admin:
|
||||
repo:
|
||||
clientID:
|
||||
clientSecret:
|
||||
proxy:
|
||||
|
||||
cusdis:
|
||||
host:
|
||||
id:
|
||||
widgets:
|
||||
homepage:
|
||||
- type: search
|
||||
- type: archives
|
||||
params:
|
||||
limit: 5
|
||||
- type: categories
|
||||
params:
|
||||
limit: 10
|
||||
- type: tag-cloud
|
||||
params:
|
||||
limit: 10
|
||||
page:
|
||||
- type: toc
|
||||
|
||||
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
|
||||
|
||||
### Custom menu
|
||||
### See https://stack.jimmycai.com/config/menu
|
||||
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
|
||||
menu:
|
||||
main: []
|
||||
|
||||
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
|
||||
threshold: 60
|
||||
toLower: false
|
||||
indices:
|
||||
- name: tags
|
||||
weight: 100
|
||||
|
||||
- name: categories
|
||||
weight: 200
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
extensions:
|
||||
passthrough:
|
||||
enable: true
|
||||
delimiters:
|
||||
block:
|
||||
- - \[
|
||||
- \]
|
||||
- - $$
|
||||
- $$
|
||||
inline:
|
||||
- - \(
|
||||
- \)
|
||||
renderer:
|
||||
## Set to true if you have HTML content inside Markdown
|
||||
unsafe: true
|
||||
tableOfContents:
|
||||
endLevel: 4
|
||||
ordered: true
|
||||
startLevel: 2
|
||||
highlight:
|
||||
noClasses: false
|
||||
codeFences: true
|
||||
guessSyntax: true
|
||||
lineNoStart: 1
|
||||
lineNos: true
|
||||
lineNumbersInTable: true
|
||||
tabWidth: 4
|
||||
@@ -1,3 +1,3 @@
|
||||
module github.com/CaiJimmy/hugo-theme-stack/v3
|
||||
module github.com/CaiJimmy/hugo-theme-stack/v4
|
||||
|
||||
go 1.17
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
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:
|
||||
compact: false
|
||||
emoji:
|
||||
subtitle:
|
||||
avatar:
|
||||
enabled: true
|
||||
local: true
|
||||
src: img/avatar.png
|
||||
|
||||
article:
|
||||
headingAnchor: false
|
||||
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:
|
||||
|
||||
beaudar:
|
||||
repo:
|
||||
issueTerm: pathname
|
||||
label:
|
||||
theme:
|
||||
|
||||
remark42:
|
||||
host:
|
||||
site:
|
||||
locale:
|
||||
|
||||
vssue:
|
||||
platform:
|
||||
owner:
|
||||
repo:
|
||||
clientId:
|
||||
clientSecret:
|
||||
autoCreateIssue: false
|
||||
|
||||
# Waline client configuration see: https://waline.js.org/en/reference/client/props.html
|
||||
waline:
|
||||
serverURL:
|
||||
lang:
|
||||
visitor:
|
||||
avatar:
|
||||
emoji:
|
||||
- https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo
|
||||
requiredMeta:
|
||||
- nick
|
||||
- mail
|
||||
locale:
|
||||
admin: Admin
|
||||
placeholder:
|
||||
|
||||
twikoo:
|
||||
envId:
|
||||
region:
|
||||
path:
|
||||
lang:
|
||||
|
||||
giscus:
|
||||
repo:
|
||||
repoID:
|
||||
category:
|
||||
categoryID:
|
||||
mapping:
|
||||
strict:
|
||||
lightTheme:
|
||||
darkTheme:
|
||||
reactionsEnabled: 1
|
||||
emitMetadata: 0
|
||||
inputPosition:
|
||||
lang:
|
||||
|
||||
gitalk:
|
||||
owner:
|
||||
admin:
|
||||
repo:
|
||||
clientID:
|
||||
clientSecret:
|
||||
|
||||
cusdis:
|
||||
host:
|
||||
id:
|
||||
|
||||
widgets:
|
||||
homepage: []
|
||||
page: []
|
||||
|
||||
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
|
||||
@@ -0,0 +1,47 @@
|
||||
toggleMenu = "اخفي القائمة"
|
||||
darkMode = "الوضع الداكن"
|
||||
|
||||
[list]
|
||||
section = "قسم"
|
||||
|
||||
[list.page]
|
||||
one = "{{ .Count }} صفحه"
|
||||
other = "{{ .Count }} صفحات"
|
||||
|
||||
[list.subsection]
|
||||
one = "قسم فرعي"
|
||||
other = "اقسام فرعية"
|
||||
|
||||
[article]
|
||||
back = "خلف"
|
||||
tableOfContents = "جدول المحتويات"
|
||||
relatedContent = "محتوى مشابهه"
|
||||
lastUpdatedOn = "التعديل الاخير"
|
||||
|
||||
[article.readingTime]
|
||||
one = "تُقرأ خلال دقيقة"
|
||||
other = "تُقرأ خلال {{ .Count }} دقائق"
|
||||
|
||||
[notFound]
|
||||
title = "غير موجود"
|
||||
subtitle = "تعذر العثور على الصفحة المطلوبة."
|
||||
|
||||
[widget]
|
||||
[widget.archives]
|
||||
title = "الارشيفات"
|
||||
more = "اكثر"
|
||||
|
||||
[widget.tagCloud]
|
||||
title = "وسوم"
|
||||
|
||||
[widget.categoriesCloud]
|
||||
title = "التصنيفات"
|
||||
|
||||
[search]
|
||||
title = "بحث"
|
||||
placeholder = "اكتب..."
|
||||
resultTitle = "#PAGES_COUNT نتيجة (#TIME_SECONDS ثواني)"
|
||||
|
||||
[footer]
|
||||
builtWith = "مبني باستخدام {{ .Generator }}"
|
||||
designedBy = "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"
|
||||
@@ -1,74 +0,0 @@
|
||||
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: "تُقرأ خلال دقيقة"
|
||||
other: "تُقرأ خلال {{ .Count }} دقائق"
|
||||
|
||||
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 }}"
|
||||
@@ -0,0 +1,45 @@
|
||||
toggleMenu = "Паказаць/схаваць меню"
|
||||
darkMode = "Цёмны рэжым"
|
||||
|
||||
[list]
|
||||
section = "Раздзел"
|
||||
|
||||
[list.page]
|
||||
one = "{{ .Count }} старонка"
|
||||
few = "{{ .Count }} старонкі"
|
||||
many = "{{ .Count }} старонак"
|
||||
other = "{{ .Count }} старонкі"
|
||||
|
||||
[list.subsection]
|
||||
one = "Падраздзел"
|
||||
few = "Падраздзелы"
|
||||
many = "Падраздзелы"
|
||||
other = "Падраздзелы"
|
||||
|
||||
[article]
|
||||
back = "Назад"
|
||||
relatedContent = "Таксама рэкамендуем"
|
||||
lastUpdatedOn = "Абноўлена"
|
||||
tableOfContents = "Змест"
|
||||
readingTime = "Час чытання: {{ .Count }} хв."
|
||||
|
||||
[notFound]
|
||||
title = "Не знойдзена"
|
||||
subtitle = "Запытваемая старонка не існуе"
|
||||
|
||||
[widget]
|
||||
[widget.archives]
|
||||
title = "Архівы"
|
||||
more = "Яшчэ"
|
||||
|
||||
[widget.tagCloud]
|
||||
title = "Тэгі"
|
||||
|
||||
[search]
|
||||
title = "Пошук"
|
||||
placeholder = "Увядзіце нешта..."
|
||||
resultTitle = "Знайдзена #PAGES_COUNT старонак (за #TIME_SECONDS с.)"
|
||||
|
||||
[footer]
|
||||
builtWith = "Створана пры дапамозе {{ .Generator }}"
|
||||
designedBy = "Тэма {{ .Theme }}, дызайн {{ .DesignedBy }}"
|
||||
@@ -1,72 +0,0 @@
|
||||
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 }}
|
||||
@@ -0,0 +1,47 @@
|
||||
toggleMenu = "Покажи Меню"
|
||||
darkMode = "Тъмен Режим"
|
||||
|
||||
[list]
|
||||
section = "Секция"
|
||||
|
||||
[list.page]
|
||||
one = "{{ .Count }} страница"
|
||||
other = "{{ .Count }} страници"
|
||||
|
||||
[list.subsection]
|
||||
one = "Подсекция"
|
||||
other = "Подсекции"
|
||||
|
||||
[article]
|
||||
back = "Назад"
|
||||
tableOfContents = "Съдържание"
|
||||
relatedContent = "Свързано Съдържание"
|
||||
lastUpdatedOn = "Последна промяна на"
|
||||
|
||||
[article.readingTime]
|
||||
one = "{{ .Count }} minute read"
|
||||
other = "{{ .Count }} minute read"
|
||||
|
||||
[notFound]
|
||||
title = "Не е намерено"
|
||||
subtitle = "Страницата която търсите не е открита"
|
||||
|
||||
[widget]
|
||||
[widget.archives]
|
||||
title = "Архиви"
|
||||
more = "Повече"
|
||||
|
||||
[widget.tagCloud]
|
||||
title = "Тагове"
|
||||
|
||||
[widget.categoriesCloud]
|
||||
title = "Категории"
|
||||
|
||||
[search]
|
||||
title = "Търсене"
|
||||
placeholder = "Напишете нещо..."
|
||||
resultTitle = "#PAGES_COUNT страници (#TIME_SECONDS секунди)"
|
||||
|
||||
[footer]
|
||||
builtWith = "Създадено с {{ .Generator }}"
|
||||
designedBy = "Тема {{ .Theme }} създадена от {{ .DesignedBy }}"
|
||||
@@ -1,73 +0,0 @@
|
||||
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 }}
|
||||
@@ -0,0 +1,47 @@
|
||||
toggleMenu = "টগল মেনু"
|
||||
darkMode = "ডার্ক মোড"
|
||||
|
||||
[list]
|
||||
section = "অনুচ্ছেদ"
|
||||
|
||||
[list.page]
|
||||
one = "{{ .Count }} পাতা"
|
||||
other = "{{ .Count }} পাতা"
|
||||
|
||||
[list.subsection]
|
||||
one = "উপ-অনুচ্ছেদ"
|
||||
other = "উপ-অনুচ্ছেদ"
|
||||
|
||||
[article]
|
||||
back = "পেছনে"
|
||||
tableOfContents = "সূচিপত্র"
|
||||
relatedContent = "সম্পর্কিত বিষয়বস্তু"
|
||||
lastUpdatedOn = "সর্বশেষ আপডেট করা হয়েছে"
|
||||
|
||||
[article.readingTime]
|
||||
one = "{{ .Count }} মিনিটে পড়া যাবে"
|
||||
other = "{{ .Count }} মিনিটে পড়া যাবে"
|
||||
|
||||
[notFound]
|
||||
title = "পাওয়া যায়নি"
|
||||
subtitle = "এই পাতাটি বিদ্যমান নেই"
|
||||
|
||||
[widget]
|
||||
[widget.archives]
|
||||
title = "আর্কাইভ"
|
||||
more = "আরও"
|
||||
|
||||
[widget.tagCloud]
|
||||
title = "ট্যাগ"
|
||||
|
||||
[widget.categoriesCloud]
|
||||
title = "বিভাগ"
|
||||
|
||||
[search]
|
||||
title = "অনুসন্ধান"
|
||||
placeholder = "কিছু টাইপ করুন..."
|
||||
resultTitle = "#PAGES_COUNT পাতা (#TIME_SECONDS সেকেন্ড)"
|
||||
|
||||
[footer]
|
||||
builtWith = "{{ .Generator }} দিয়ে নির্মিত"
|
||||
designedBy = "থিম {{ .Theme }} ডিজাইন করেছেন {{ .DesignedBy }}"
|
||||
@@ -1,73 +0,0 @@
|
||||
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: পাওয়া যায়নি
|
||||
|
||||
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 }}"
|
||||
@@ -0,0 +1,47 @@
|
||||
toggleMenu = "Toggle Menu"
|
||||
darkMode = "Mode fosc"
|
||||
|
||||
[list]
|
||||
section = "Secció"
|
||||
|
||||
[list.page]
|
||||
one = "{{ .Count }} pàgina"
|
||||
other = "{{ .Count }} pàgines"
|
||||
|
||||
[list.subsection]
|
||||
one = "Subsecció"
|
||||
other = "Subseccions"
|
||||
|
||||
[article]
|
||||
back = "Tornar"
|
||||
tableOfContents = "Taula de contingut"
|
||||
relatedContent = "Continguts relacionats"
|
||||
lastUpdatedOn = "Última vegada actualitzat"
|
||||
|
||||
[article.readingTime]
|
||||
one = "{{ .Count }} minut a llegir"
|
||||
other = "{{ .Count }} minuts a llegir"
|
||||
|
||||
[notFound]
|
||||
title = "No Trobat"
|
||||
subtitle = "Aquesta pàgina no existeix"
|
||||
|
||||
[widget]
|
||||
[widget.archives]
|
||||
title = "Arxiu"
|
||||
more = "Més"
|
||||
|
||||
[widget.tagCloud]
|
||||
title = "Etiquetes"
|
||||
|
||||
[widget.categoriesCloud]
|
||||
title = "Categories"
|
||||
|
||||
[search]
|
||||
title = "Cerca"
|
||||
placeholder = "Tecleja alguna cosa..."
|
||||
resultTitle = "#PAGES_COUNT pàgines en (#TIME_SECONDS segons)"
|
||||
|
||||
[footer]
|
||||
builtWith = "Creat amb {{ .Generator }}"
|
||||
designedBy = "Tema {{ .Theme }} dissenyat per {{ .DesignedBy }}"
|
||||