Compare commits

...
74 Commits
Author SHA1 Message Date
Jimmy Cai ffab83a637 release: 3.34.0 2026-01-25 17:55:45 +01:00
JimmyandGitHub 9add062300 refactor: centralize pagination logic (#1227)
* refactor: centralize pagination logic into a new helper partial used for page titles and index display

* fix: list.html does not exclude hidden pages

* refactor: Simplify title generation logic
2026-01-25 17:54:13 +01:00
JimmyandGitHub 12daa8c9fc feat: dynamically generate background color for category links (#1225)
* chore: add +x to run.sh

* feat: dynamically generate background color for category links using hash

* feat: allow category styles to be overridden by term parameters

* refactor: remove default tag background and color variables
2026-01-25 17:35:40 +01:00
JimmyandGitHub f804db2c80 fix: load mermaid partial without cache (#1226) 2026-01-25 16:50:33 +01:00
Jimmy Cai 090378e4da ci: move to cloudflare worker 2026-01-25 12:09:53 +01:00
Jimmy d6ced60f51 release: 3.33.0 2025-12-22 16:17:42 +00:00
JimmyandGitHub dc36aa60a9 fix: remove hidden posts using where keyword (#1212) 2025-12-22 17:12:34 +01:00
JimmyandGitHub 475d01b046 fix: adjust padding and width for article list tiles in subsection list (#1211) 2025-12-22 16:51:39 +01:00
5a5876e3ea refactor(scss): remove--zh-font-family (#1183)
* fix(scss): limit `--zh-font-family` to only simplified Chinese

* feat(sampleSite): add test page for Japanese & Traditional Chinese

* Remove `--zh-font-family` variable

---------

Co-authored-by: Jimmy <jimmy@cai.im>
2025-12-22 16:28:58 +01:00
ba9a5caa16 feat: add support for Mermaid diagrams in Markdown content (#1186)
* Add support for Mermaid diagrams in markdown content

This commit introduces native Mermaid diagram rendering to the theme.

Following Hugo’s official documentation, a new custom code block renderer
(`render-codeblock-mermaid.html`) was added under `layouts/_default/` to
detect Mermaid code blocks and inject the necessary script flag into the
page context.

Additionally, the `baseof.html` template now conditionally includes the
Mermaid JS module from the CDN when a page contains a Mermaid diagram:

  {{ if .Store.Get "hasMermaid" }}
    <script type="module">
      import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
      mermaid.initialize({ startOnLoad: true, theme: 'neutral' });
    </script>
  {{ end }}

This enables rendering of fenced code blocks using the `mermaid` language
in markdown files without requiring any external preprocessing.

* Create article/components/mermaid and fix script version

---------

Co-authored-by: Jimmy <jimmy@cai.im>
2025-12-22 13:40:33 +01:00
47db505228 feat: pagination improvements to maximize space utilization (#1165)
* Minor improvements to pagination functions

* Update pagination styles with enhanced UI/UX design

- Implemented full-width layout with flexible page numbers
- Added fixed-width arrow buttons for consistent navigation
- Enhanced hover and active states for better user interaction
- Improved responsive design with proper flex layout
- Added comprehensive styling for disabled and ellipsis states

* Simplify pagination logic and use SVG files to avoid repeated definition

* Remove change to jsconfig.json

* Remove comments and classes

---------

Co-authored-by: delize <4028612+delize@users.noreply.github.com>
Co-authored-by: Jimmy <jimmy@cai.im>
2025-12-22 00:21:02 +01:00
AiratTopandGitHub dc94a29617 fix(i18n): category widget title in ru.yaml (#1199)
Fix category widget title in ru.yaml
2025-12-21 20:59:59 +01:00
7df31001af fix(theme): Adjust Cusdis widget scrollbar and background to match Stack theme (#1204)
* fix: adjust cusdis scrollbar styling and background for stack theme

* feat: dynamically set cusdis background color

---------

Co-authored-by: Jimmy <jimmy@cai.im>
2025-12-21 20:55:09 +01:00
Jimmy 73ccacec4d release: 3.32.0 2025-11-01 21:15:56 +00:00
JimmyandGitHub 2612ca87dc feat: allow specify alt for link's image (#1198) 2025-11-01 22:14:52 +01:00
CelesteandGitHub e8fc315ead fix: decode special characters in the search bar on 404 pages (#1098)
An extremely simple fix to decode special characters
2025-11-01 22:01:24 +01:00
Jerry KimandGitHub 145cda7d45 feat: use ResizeObserver to detect changes in the size of .article-content (#1105)
* Use ResizeObserver to detect changes in the size of .article-content

This code is for handling changes in position caused by content rendered as part of post-processing, such as Mermaid diagrams

* Add debounced to resizeHandler
2025-11-01 21:59:30 +01:00
Gleb A.andGitHub d507f2ef7c fix(i18n): minor translation changes for Italian (#1127) 2025-11-01 21:57:12 +01:00
Gleb A.andGitHub 8f7eeb7de6 fix: Uncaught TypeError: link is null in buildIdToNavigationElementMap (#1133)
fix: Uncaught TypeError: link is null in buildIdToNavigationElementMap (#1132)
2025-11-01 21:57:02 +01:00
AMomentandGitHub dd3bb1ea13 feat: render math formula for the table of contents (#1137)
Add math formula render to table of contents

Add element (.widget--toc) to be rendered by KaTeX
2025-11-01 21:54:06 +01:00
Andreas DeiningerandGitHub 291fe5fd7e feat: remove deprecated Hugo templates and shortcode usage (#1150)
Adapt site to latest hugo version 0.147.1
2025-11-01 21:49:15 +01:00
JimmyandGitHub 512a9ab625 feat: upgrade Hugo version in Netlify and DevContainer file (#1197)
* feat: upgrade Netlify Hugo version to 0.152.2

* feat: update to newer Hugo DevContainer file
2025-11-01 21:45:48 +01:00
AradielandGitHub 5a10223f4c fix: modify sidebar link active conditions (needs to be the same page URL) (#1153)
Sidebar link active conditions - needs to be the same page
2025-11-01 21:41:10 +01:00
stanolandGitHub 0b22c0a293 fix(i18n): missing translation for title of categories widget in uk.yaml (#1162) 2025-11-01 21:36:29 +01:00
powerfullzandGitHub c413980b89 fix(twikoo): certain Twikoo elements wouldn’t automatically switch colours in dark mode and update to Twikoo version 1.6.44 (#1163) 2025-11-01 21:35:09 +01:00
Christian Martínez de la RosaandGitHub 6d98e8463f fix: use localized title for categories taxonomy in archives page (#1158)
closes #1157
2025-11-01 21:30:37 +01:00
-Zonbi@TR~$andGitHub 50a42f28c0 feat(i18n/tr): add missing translations for tr language (#1160) 2025-11-01 21:28:26 +01:00
Terence EdenandGitHub f824d08f6f fix: semantic <time> by adding datetime attribute (#1184)
Fix semantic <time>

The HTML validator was throwing an error because there was no valid datetime attribute.
2025-11-01 20:53:37 +01:00
JimmyandGitHub 2f47d14a8a fix: add missing object-fit: cover to section-image (#1196) 2025-11-01 20:43:19 +01:00
KonnyakuandGitHub 2d1d6727f5 feat(scss): Enhance text rendering with autospace properties (#1188)
* Enhance text rendering with autospace properties

Added text autospace properties for better text rendering for CJK characters.

* Update text-autospace and text-spacing properties
2025-11-01 19:33:23 +01:00
JimmyandGitHub 8cb1646198 style: remove unused count class in tag cloud (#1195) 2025-10-31 23:48:40 +01:00
Jimmy 9e96c6e975 release: 3.31.0 2025-09-10 10:14:29 +00:00
Gleb A.andGitHub 47832083d8 refactor(comments): use includes instead of indexOf to improve readability (#1128)
* fix(disqusjs): refactor local DisqusJS loading check for improved readability

* fix(gitalk): refactor local Gitalk loading check for improved readability
2025-05-21 12:52:47 +02:00
LparksiandGitHub d9acd77015 feat(comment/waline): add support for Waline's turnstileKey (#1140)
* fix: Added support for waline's turnstileKey

* style: remove extra space in waline.html
2025-05-21 12:31:22 +02:00
Bernat Borràs CivilandGitHub 06aa627d3c fix(article): date translation on compact mode (#1149)
* Fix translation

* Revert jsconfig
2025-05-21 12:25:11 +02:00
Jimmy Cai 9e6b7b22a9 release: 3.30.0 2025-01-23 22:55:27 +01:00
JimmyandGitHub f1ab6c6aba fix(giscus): no longer use $.Language.LanguageCode for the language of Giscus (#1118)
fix(giscus): rollback https://github.com/CaiJimmy/hugo-theme-stack/pull/1075

User can still customize the language used for Giscus using `.Site.Params.comments.giscus.lang` parameter.
2025-01-23 22:54:37 +01:00
HamzaandGitHub 087989e427 chore(i18n): fix a tiny typo in the footer (#1099) 2024-12-22 14:53:10 +01:00
fsj2009yxandGitHub 0991f61d49 fix(comment/waline): cannot read property ‘insertBefore’ of null (#1103)
* fix: resolve issue with comments not displaying due to KaTeX and Waline render order

* Fix the problem that comment data couldn't be pulled successfully and raise Error "Cannot read property ‘insertBefore’ of null""
2024-12-22 12:44:13 +01:00
Jimmy Cai 839fbd0ecb release: 3.29.0 2024-10-20 08:05:45 +00:00
Jimmy CaiandGitHub 5175ac5ae3 fix(giscus): fallback to en if no language code is set (#1084) 2024-10-20 10:04:59 +02:00
Jimmy CaiandGitHub 37f1541c20 feat: search box in 404 page (#1081) 2024-10-20 00:26:59 +02:00
Jimmy Cai f4eb5d3e99 release: 3.28.0 2024-10-19 21:32:49 +00:00
xiaoxiyaoandGitHub 788dd497b3 feat: add fingerprints to the JS file URL to utilize HTTP caching (#1076) 2024-10-19 21:14:35 +02:00
xiaoxiyaoandGitHub 8a7fb33163 feat(giscus): use current language as fallback for lang param and add loading param (#1075)
fix: giscus use current lang as default, and add missing `loading` params
2024-10-19 20:46:27 +02:00
onavas33andGitHub 2a18a92901 fix(i18n): missing translation for title of categories widget in fr.yaml (#1059) 2024-10-06 19:33:20 +02:00
PukNgae CryolitiaandGitHub 245b0f2810 fix(colorScheme): systemPreferScheme not initialized on start up (#1061) 2024-10-06 19:32:13 +02:00
Jimmy CaiandGitHub 0fb25c808b fix: show different subtitle for each i18n variant in exampleSite (#1068) 2024-10-06 19:17:40 +02:00
Jimmy Cai 048a000f17 release: 3.27.0 2024-09-07 18:57:23 +02:00
Jimmy CaiandGitHub 5f157478aa fix(exampleSite): site config key paginate was deprecated (#1057)
fix: site config key paginate was deprecated
2024-09-07 18:51:18 +02:00
Jimmy CaiandGitHub 8556681b7c doc: add markup.goldmark.extensions.passthrough in exampleSite (#1056)
Related: https://github.com/CaiJimmy/hugo-theme-stack/issues/1019
2024-09-07 18:47:15 +02:00
powerfullzandGitHub fa760d70cb fix: use css.Sass instead of deprecated resources.ToCSS (#1054) 2024-09-07 18:42:07 +02:00
Syafa AdenaandGitHub bdcab89d86 chore: bump Twikoo front-end to latest released version 1.6.39 (#1021) 2024-09-07 18:14:57 +02:00
saikadaramakaisosjupitaandGitHub b3907acdae doc: add backslash to baseURL in exampleSite (#1009) 2024-09-07 17:59:59 +02:00
Vladimir VitkovandGitHub 23ff70d41a feat(i18n): add Bulgarian translations (#1007) 2024-09-07 17:56:17 +02:00
ensag-devandGitHub 41a3e5ee13 feat(i18n): add Occitan translations (#1034) 2024-09-07 17:52:40 +02:00
0558108e30 feat(comments): add support to Gitalk proxy parameter (#1012)
Co-authored-by: Jimmy Cai <hi@jimmycai.com>
2024-09-07 17:18:03 +02:00
Anthony SimmonandGitHub 12f31dfd8a fix: use Hugo's default RSS template value source for lastBuildDate (#1006)
Use Hugo's default RSS template value source for lastBuildDate
2024-09-07 14:22:17 +02:00
weeixandGitHub 374b25a60f fix(i18n): fix unlocalized article publish/lastUpdated date (#1050)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1040
2024-09-07 13:48:09 +02:00
Jimmy CaiandGitHub fcd56dd21c fix: article category overflow (#1055)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1045
2024-09-07 13:25:26 +02:00
Jimmy Cai fddab05362 release: 3.26.0 2024-05-02 23:28:01 +02:00
Jimmy CaiandGitHub f3783856ad feat: add article.headingAnchor parameter and use CSS pseudo-element to display # symbol of heading anchor (#1016)
* feat: add `article.headingAnchor` parameter

* feat: use CSS pseudo-element to display `#` symbol of heading anchor

This prevents RSS feed readers and screen readers from seeing an extra `#`.

* Deactivate `article.headingAnchor` by default
2024-05-02 23:27:17 +02:00
Jimmy CaiandGitHub 130e2f6607 feat: display header anchor on hover (#999) 2024-03-30 23:22:18 +01:00
Jimmy Cai ce798a32a9 release: 3.25.0 2024-03-27 17:01:23 +01:00
Jimmy CaiandGitHub 609d43b088 fix: make KaTeX render all math inside document.body (#994)
Since it only accepts one element, I cannot pass `.article-content` and `#TableOfContent` to it. The official documentation uses `document.body` directly, so I guess that's fine.

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/882
2024-03-27 16:38:30 +01:00
Jimmy CaiandGitHub 797949b37f fix: rename .social-menu to .menu-social to avoid being blocked by ad blockers (#993)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/924
2024-03-27 16:24:03 +01:00
Jimmy CaiandGitHub 539c39d69a feat: add anchor link to markdown heading (#992)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/935
2024-03-27 16:08:19 +01:00
Jimmy CaiandGitHub f8466d94d2 fix(i18n): wrap footer.builtWith with double quotes in Japanese translation (#991) 2024-03-27 16:01:43 +01:00
Shun SakaiandGitHub 43e074364c feat(i18n): update translations for ja (#984)
* feat(i18n): update translations for `ja`

* Apply review suggestions
2024-03-27 11:21:32 +01:00
andrewmoiseandGitHub b2157bdf78 docs: update some invalid documentation links (#983)
Update some documentation links (some were dead links)
2024-03-27 11:09:17 +01:00
Jimmy CaiandGitHub 23607527e4 fix: use page resource permalink in link image (#990)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/982
2024-03-27 10:58:22 +01:00
Jimmy Cai 54a8ace564 release 3.24.2 2024-03-17 20:41:27 +01:00
Andreas DeiningerandGitHub b3fbe78ca5 fix: deprecation warning for .Site.Author (#979)
Fix deprecation warning for .Site.Author, deprecated in Hugo 0.124.0
2024-03-17 20:40:56 +01:00
Jimmy CaiandGitHub 2cb5ba683b fix: remove \n character from meta description (#980) 2024-03-17 20:39:16 +01:00
97 changed files with 830 additions and 265 deletions
+68
View File
@@ -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 "$@"
+39 -14
View File
@@ -1,31 +1,56 @@
# Update the NODE_VERSION arg in docker-compose.yml to pick a Node version: 10, 12, 14
ARG NODE_VERSION=14
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${NODE_VERSION}
# 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
ARG VARIANT=hugo_extended
# VERSION can be either 'latest' or a specific version number
ARG VERSION=latest
# Download Hugo
RUN apt-get update && apt-get install -y ca-certificates openssl git curl && \
rm -rf /var/lib/apt/lists/* && \
case ${VERSION} in \
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} && \
wget -O ${VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${VARIANT}_${VERSION}_Linux-64bit.tar.gz && \
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
# [Optional] Uncomment this section to install additional OS packages you may want.
#
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment if you want to install more global node packages
# RUN sudo -u node npm install -g <your-package-list-here>
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
+45 -39
View File
@@ -1,45 +1,51 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.202.3/containers/hugo
{
"name": "Hugo (Community)",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update VARIANT to pick hugo variant.
// Example variants: hugo, hugo_extended
// Rebuild the container if it already exists to update.
"VARIANT": "hugo_extended",
// Update VERSION to pick a specific hugo version.
// Example versions: latest, 0.73.0, 0,71.1
// Rebuild the container if it already exists to update.
"VERSION": "latest",
// Update NODE_VERSION to pick the Node.js version: 12, 14
"NODE_VERSION": "14",
}
},
"name": "Hugo & pnpm",
// Set *default* container specific settings.json values on container create.
"settings": {
"html.format.templating": true,
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bungcip.better-toml",
"davidanson.vscode-markdownlint"
],
"build": {
"dockerfile": "Dockerfile"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
1313
],
// 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features.
// "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {} },
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",
// 👇 Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"golang": "latest"
}
// 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"
}
+1 -1
View File
@@ -4,7 +4,7 @@ body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/).
Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/guide/).
- type: textarea
id: what-happened
attributes:
+1
View File
@@ -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

+1
View File
@@ -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

+1
View File
@@ -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 -9
View File
@@ -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);
}
}
}
}
}
@@ -131,6 +122,7 @@
.article-tags {
display: flex;
gap: 10px;
flex-wrap: wrap;
a {
color: var(--accent-color-text);
+4 -1
View File
@@ -12,6 +12,9 @@ body {
margin: 0;
font-family: var(--base-font-family);
font-size: 1.6rem;
text-autospace: ideograph-alpha ideograph-numeric punctuation insert;
text-spacing-trim: trim-start allow-end;
-ms-text-autospace: ideograph-alpha;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@@ -35,4 +38,4 @@ body {
::-webkit-scrollbar-track {
background-color: transparent;
}
/**/
/**/
+22 -1
View File
@@ -67,7 +67,6 @@
}
.article-tags {
flex-wrap: wrap;
text-transform: unset;
}
@@ -222,6 +221,28 @@
margin-inline-start: calc((var(--card-padding)) * -1);
padding-inline-start: calc(var(--card-padding) - var(--heading-border-size));
border-inline-start: var(--heading-border-size) solid var(--accent-color);
position: relative;
a.header-anchor {
transition: opacity 0.3s ease;
opacity: 0;
position: absolute;
left: 0;
width: var(--card-padding);
text-align: center;
color: var(--accent-color);
&:before {
content: "#";
}
}
&:hover,
&:focus {
a.header-anchor {
opacity: 1;
}
}
}
figure {
+5 -2
View File
@@ -33,6 +33,7 @@
img {
width: 60px;
height: 60px;
object-fit: cover;
}
}
@@ -47,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;
@@ -68,4 +71,4 @@
}
}
}
}
}
+1 -1
View File
@@ -212,7 +212,7 @@
}
}
.social-menu {
.menu-social {
list-style: none;
padding: 0;
margin: 0;
+38 -9
View File
@@ -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;
}
}
}
}
+2 -7
View File
@@ -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;
}
/*
+4
View File
@@ -8,6 +8,10 @@ class StackColorScheme {
constructor(toggleEl: HTMLElement) {
this.bindMatchMedia();
this.currentScheme = this.getSavedScheme();
if (window.matchMedia('(prefers-color-scheme: dark)').matches === true)
this.systemPreferScheme = 'dark'
else
this.systemPreferScheme = 'light';
this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);
+13 -4
View File
@@ -32,9 +32,11 @@ function buildIdToNavigationElementMap(navigation: NodeListOf<Element>): IdToEle
const sectionLinkRef: IdToElementMap = {};
navigation.forEach((navigationElement: HTMLElement) => {
const link = navigationElement.querySelector("a");
const href = link.getAttribute("href");
if (href.startsWith("#")) {
sectionLinkRef[href.slice(1)] = navigationElement;
if (link) {
const href = link.getAttribute("href");
if (href.startsWith("#")) {
sectionLinkRef[href.slice(1)] = navigationElement;
}
}
});
@@ -125,7 +127,14 @@ function setupScrollspy() {
scrollHandler();
}
// Use ResizeObserver to detect changes in the size of .article-content
const articleContent = document.querySelector(".article-content");
if (articleContent) {
const resizeObserver = new ResizeObserver(debounced(resizeHandler));
resizeObserver.observe(articleContent);
}
window.addEventListener("resize", debounced(resizeHandler));
}
export { setupScrollspy };
export { setupScrollspy };
+8 -1
View File
@@ -53,7 +53,14 @@ class Search {
this.resultTitle = resultTitle;
this.resultTitleTemplate = resultTitleTemplate;
this.handleQueryString();
/// Check if there's already value in the search input
if (this.input.value.trim() !== '') {
this.doSearch(this.input.value.split(' '));
}
else {
this.handleQueryString();
}
this.bindQueryStringChange();
this.bindSearchForm();
}
-1
View File
@@ -1 +0,0 @@
cd exampleSite && hugo server --gc --themesDir=../..
+8
View File
@@ -0,0 +1,8 @@
---
menu:
main:
name: ホーム
weight: -100
params:
icon: home
---
+8
View File
@@ -0,0 +1,8 @@
---
menu:
main:
name: 主頁
weight: -100
params:
icon: home
---

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

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,26 @@
---
title: Japanese Test
description: これはサブタイトル
date: 2020-09-09
slug: test-chinese
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
categories:
- Test
- テスト
---
## 本文テスト(フォント)
返扇花週認契適違込遷雇述請曜藤突扉直角
## 引用
> 国破れて山河在り\
> 城春にして草木深し\
> 時に感じては花にも涙を濺ぎ\
> 別れを恨んでは鳥にも心を驚かす
>
> 烽火三月に連なり\
> 家書万金に抵たる\
> 白頭掻けば更に短く\
> 渾べて簪に勝へざらんと欲す
@@ -36,4 +36,8 @@ categories:
![Photo by Helena Hertz on Unsplash](helena-hertz-wWZzXlDpMog-unsplash.jpg) ![Photo by Hudai Gayiran on Unsplash](hudai-gayiran-3Od_VKcDEAA-unsplash.jpg)
```
相册语法来自 [Typlog](https://typlog.com/)
相册语法来自 [Typlog](https://typlog.com/)
## 字体
返扇花週認契適違込遷雇述請曜藤突扉直角
@@ -0,0 +1,14 @@
---
title: Chinese Test
description: 這是一個副標題
date: 2020-09-09
slug: test-chinese
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
categories:
- Test
- 測試
---
## 正文測試(字體)
返扇花週認契適違込遷雇述請曜藤突扉直角

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

@@ -21,7 +21,7 @@ To enable emoji globally, set `enableEmoji` to `true` in your site's [configurat
<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](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
The [Emoji cheat sheet](https://www.webfx.com/tools/emoji-cheat-sheet/) is a useful reference for emoji shorthand codes.
***

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

@@ -21,9 +21,9 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
---
## Twitter Simple Shortcode
## X Simple Shortcode
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
{{< x user="DesignReviewed" id="1085870671291310081" >}}
<br>
@@ -37,10 +37,6 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
{{< bilibili av498363026 >}}
## Gist Shortcode
{{< gist spf13 7896402 >}}
## Gitlab Snippets Shortcode
{{< gitlab 2349278 >}}
+42 -8
View File
@@ -1,7 +1,6 @@
baseurl: https://example.com
baseurl: https://example.com/
languageCode: en-us
theme: hugo-theme-stack
paginate: 3
title: Example Site
copyright: Example Person
@@ -19,20 +18,39 @@ languages:
title: Example Site
weight: 1
params:
description: Example description
sidebar:
subtitle: Example description
zh-cn:
languageName: 中文
languageName: 简体中文
title: 演示站点
weight: 2
params:
description: 演示说明
sidebar:
subtitle: 演示说明
zh-tw:
languageName: 正體中文
title: 演示站點
weight: 2
params:
sidebar:
subtitle: 演示說明
ja:
languageName: 日本語
title: サンプルサイト
weight: 2
params:
sidebar:
subtitle: サンプル説明
ar:
languageName: عربي
languagedirection: rtl
title: موقع تجريبي
weight: 3
params:
description: وصف تجريبي
sidebar:
subtitle: وصف تجريبي
services:
# Change it to your Disqus shortname before using
@@ -42,6 +60,9 @@ services:
googleAnalytics:
id:
pagination:
pagerSize: 3
permalinks:
post: /p/:slug/
page: /:slug/
@@ -97,7 +118,7 @@ params:
repo:
issueTerm: pathname
label:
theme:
theme:
remark42:
host:
@@ -156,6 +177,7 @@ params:
repo:
clientID:
clientSecret:
proxy:
cusdis:
host:
@@ -203,7 +225,7 @@ params:
enabled: true
### Custom menu
### See https://docs.stack.jimmycai.com/configuration/custom-menu.html
### See https://stack.jimmycai.com/config/menu
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
menu:
main: []
@@ -234,6 +256,18 @@ related:
markup:
goldmark:
extensions:
passthrough:
enable: true
delimiters:
block:
- - \[
- \]
- - $$
- $$
inline:
- - \(
- \)
renderer:
## Set to true if you have HTML content inside Markdown
unsafe: true
Executable
+1
View File
@@ -0,0 +1 @@
hugo server --gc --themesDir=../..
+1
View File
@@ -28,6 +28,7 @@ params:
src: img/avatar.png
article:
headingAnchor: false
math: false
toc: true
readingTime: true
+1 -1
View File
@@ -68,7 +68,7 @@ search:
footer:
builtWith:
other: "مبني بستخدام {{ .Generator }}"
other: "مبني باستخدام {{ .Generator }}"
designedBy:
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"
+73
View File
@@ -0,0 +1,73 @@
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 }}
+3
View File
@@ -50,6 +50,9 @@ widget:
tagCloud:
title:
other: Mots clés
categoriesCloud:
title:
other: Catégories
search:
title:
+2 -2
View File
@@ -2,7 +2,7 @@ toggleMenu:
other: Toggle Menu
darkMode:
other: Dark Mode
other: Modalità scura
list:
page:
@@ -49,7 +49,7 @@ widget:
tagCloud:
title:
other: Tags
other: Tag
categoriesCloud:
title:
+11 -1
View File
@@ -4,6 +4,16 @@ toggleMenu:
darkMode:
other: ダークモード
list:
page:
other: "{{ .Count }} ページ目"
section:
other: セクション
subsection:
other: サブセクション
article:
back:
other: 前のページ
@@ -54,7 +64,7 @@ search:
footer:
builtWith:
other: Built with {{ .Generator }}
other: "{{ .Generator }} で構築されています。"
designedBy:
other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。
+72
View File
@@ -0,0 +1,72 @@
toggleMenu:
other: Alternar menú
darkMode:
other: Mòde fosc
list:
page:
one: "{{ .Count }} pagina"
other: "{{ .Count }} paginas"
section:
other: Seccion
subsection:
one: Josseccion
other: Josseccions
article:
back:
other: Tornar
tableOfContents:
other: Taula de contengut
relatedContent:
other: Contenguts relacionats
lastUpdatedOn:
other: Darrièra actualizacion
readingTime:
one: "{{ .Count }} minuta de lectura"
other: "{{ .Count }} minutas de lectura"
notFound:
title:
other: Non trobat
subtitle:
other: Aquesta pagina existís pas
widget:
archives:
title:
other: Archiu
more:
other: Mai
tagCloud:
title:
other: Etiquetas
categoriesCloud:
title:
other: Categorias
search:
title:
other: Cercar
placeholder:
other: Picatz quicòm...
resultTitle:
other: "#PAGES_COUNT paginas dins (#TIME_SECONDS segons)"
footer:
builtWith:
other: Creat amb {{ .Generator }}
designedBy:
other: Tàma {{ .Theme }} concebut per {{ .DesignedBy }}
+3
View File
@@ -47,6 +47,9 @@ widget:
tagCloud:
title:
other: Теги
categoriesCloud:
title:
other: Категории
search:
title:
+15 -1
View File
@@ -17,11 +17,22 @@ list:
other: Alt bölümler
article:
back:
other: Geri
tableOfContents:
other: İçindekiler
relatedContent:
other: Alakalı içerikler
other: Benzer içerikler
lastUpdatedOn:
other: Son güncelleme
readingTime:
one: "{{ .Count }} dakika okuma süresi"
other: "{{ .Count }} dakika okuma süresi"
notFound:
title:
other: Bulunamadı
@@ -37,6 +48,9 @@ widget:
tagCloud:
title:
other: Etiketler
categoriesCloud:
title:
other: Kategoriler
search:
title:
+3
View File
@@ -52,6 +52,9 @@ widget:
tagCloud:
title:
other: Теґи
categoriesCloud:
title:
other: Категорії
search:
title:
+39 -1
View File
@@ -3,5 +3,43 @@
<h1 class="article-title">{{ T "notFound.title" }}</h1>
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
</div>
{{- $query := first 1 (where .Site.Pages "Layout" "==" "search") -}}
{{- $searchPage := index $query 0 -}}
{{- with $searchPage -}}
<form action="{{ $searchPage.RelPermalink }}" class="search-form widget" {{ with .OutputFormats.Get "json" -}}data-json="{{ .Permalink }}" {{- end }}>
<p>
<label>{{ T "search.title" }}</label>
<input id="searchInput" name="keyword" required placeholder="{{ T `search.placeholder` }}" />
<button title="{{ T `search.title` }}">
{{ partial "helper/icon" "search" }}
</button>
</p>
</form>
<div class="search-result">
<h3 class="search-result--title section-title"></h3>
<div class="search-result--list article-list--compact"></div>
</div>
<script>
window.searchResultTitleTemplate = "{{ T `search.resultTitle` }}"
</script>
{{- $opts := dict "minify" hugo.IsProduction "JSXFactory" "createElement" -}}
{{- $searchScript := resources.Get "ts/search.tsx" | js.Build $opts -}}
<script type="text/javascript" src="{{ $searchScript.RelPermalink }}" defer></script>
<script>
const wrongUrl = new URL(window.location.href);
/// Get the search keyword from the wrong URL by removing all slashes and dashes
const searchKeyword = decodeURIComponent(wrongUrl.pathname).split(/[/|-]/).join(' ').trim();
document.getElementById('searchInput').setAttribute('value', searchKeyword);
</script>
{{- end -}}
{{ partialCached "footer/footer" . }}
{{ end }}
{{ end }}
@@ -0,0 +1,4 @@
<pre class="mermaid">
{{ .Inner | htmlEscape | safeHTML }}
</pre>
{{ .Page.Store.Set "hasMermaid" true }}
@@ -0,0 +1,6 @@
<h{{ .Level }} id="{{ .Anchor }}">
{{- if site.Params.Article.HeadingAnchor -}}
<a href="#{{ .Anchor }}" class="header-anchor"></a>
{{- end -}}
{{ .Text | safeHTML }}
</h{{ .Level }}>
+2 -3
View File
@@ -4,7 +4,7 @@
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
{{- $terms := $taxonomy.Pages -}}
{{ if $terms }}
<h2 class="section-title">{{ $taxonomy.Title }}</h2>
<h2 class="section-title">{{ T "widget.categoriesCloud.title" }}</h2>
<div class="subsection-list">
<div class="article-list--tile">
{{ range $terms }}
@@ -16,8 +16,7 @@
</header>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $filtered := where $pages "Params.hidden" "!=" true }}
{{ range $filtered.GroupByDate "2006" }}
{{ $id := lower (replace .Key " " "-") }}
+9 -6
View File
@@ -46,6 +46,7 @@
{{- $subsections := .Sections -}}
{{- $pages := .Pages | complement $subsections -}}
{{- $pages = where $pages "Params.hidden" "!=" true -}}
{{- if eq (len $pages) 0 -}}
{{/* If there are no normal pages, display subsections in list style, with pagination */}}
@@ -68,12 +69,14 @@
{{- end -}}
{{/* List only pages that are not a subsection */}}
{{ $paginator := .Paginate $pages }}
<section class="article-list--compact">
{{ range $paginator.Pages }}
{{ partial "article-list/compact" . }}
{{ end }}
</section>
{{ $paginator := partial "helper/paginator.html" . }}
{{ with $paginator }}
<section class="article-list--compact">
{{ range .Pages }}
{{ partial "article-list/compact" . }}
{{ end }}
</section>
{{ end }}
{{- partial "pagination.html" . -}}
+5 -5
View File
@@ -18,11 +18,11 @@
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
@@ -35,7 +35,7 @@
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
+1
View File
@@ -39,6 +39,7 @@
{{ partialCached "footer/footer" . }}
{{ partialCached "article/components/photoswipe" . }}
{{ partial "article/components/mermaid" . }}
{{ end }}
{{ define "right-sidebar" }}
+2 -5
View File
@@ -1,11 +1,8 @@
{{ define "main" }}
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $pag := .Paginate ($filtered) }}
{{- $paginator := partial "helper/paginator.html" . -}}
<section class="article-list">
{{ range $index, $element := $pag.Pages }}
{{ range $index, $element := $paginator.Pages }}
{{ partial "article-list/default" . }}
{{ end }}
</section>
+1 -2
View File
@@ -1,6 +1,5 @@
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
{{- $notHidden := where .Site.RegularPages "Params.hidden" "!=" true -}}
{{- $filtered := ($pages | intersect $notHidden) -}}
{{- $filtered := where $pages "Params.hidden" "!=" true -}}
{{- $result := slice -}}
+1 -1
View File
@@ -6,7 +6,7 @@
</h2>
<footer class="article-time">
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
</time>
</footer>
</div>
@@ -2,7 +2,10 @@
{{ if .Params.categories }}
<header class="article-category">
{{ range (.GetTerms "categories") }}
<a href="{{ .RelPermalink }}" {{ with .Params.style }}style="background-color: {{ .background }}; color: {{ .color }};"{{ end }}>
{{ $color := partial "helper/color-from-str" .LinkTitle }}
{{ $BackgroundColor := default $color.BackgroundColor .Params.style.background }}
{{ $TextColor := default $color.TextColor .Params.style.color }}
<a href="{{ .RelPermalink }}" style="background-color: {{ $BackgroundColor | safeCSS }}; color: {{ $TextColor | safeCSS }};">
{{ .LinkTitle }}
</a>
{{ end }}
@@ -31,8 +34,8 @@
{{ if $showDate }}
<div>
{{ partial "helper/icon" "date" }}
<time class="article-time--published">
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
<time class="article-time--published" datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
</time>
</div>
{{ end }}
@@ -12,7 +12,7 @@
<section class="article-lastmod">
{{ partial "helper/icon" "clock" }}
<span>
{{ T "article.lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
{{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
</span>
</section>
{{- end -}}
@@ -16,8 +16,12 @@
</div>
{{ with $link.image }}
{{ $permalink := . }}
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
{{ $permalink = .RelPermalink }}
{{ end }}
<div class="article-image">
<img src="{{ . }}" loading="lazy">
<img src="{{ $permalink }}" loading="lazy"{{ with $link.alt }} alt="{{ . }}"{{ end }}>
</div>
{{ end }}
</a>
+17 -9
View File
@@ -1,13 +1,21 @@
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
<script>
window.addEventListener("DOMContentLoaded", () => {
renderMathInElement(document.querySelector(`.article-content`), {
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false },
{ left: "\\(", right: "\\)", display: false },
{ left: "\\[", right: "\\]", display: true }
],
ignoredClasses: ["gist"]
});})
const elementsToRender = [".main-article", ".widget--toc"];
elementsToRender.forEach(selector => {
const element = document.querySelector(selector);
if (element) {
renderMathInElement(element, {
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false },
{ left: "\\(", right: "\\)", display: false },
{ left: "\\[", right: "\\]", display: true }
],
ignoredClasses: ["gist"]
});
}
});
});
</script>
@@ -0,0 +1,9 @@
{{ if .Store.Get "hasMermaid" }}
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11.12.2/+esm';
mermaid.initialize({
startOnLoad: true,
theme: 'neutral',
});
</script>
{{ end }}
+15 -9
View File
@@ -1,21 +1,27 @@
{{- $host := default "https://cusdis.com" .Site.Params.comments.cusdis.host -}}
<div id="cusdis_thread"
data-host="{{ $host }}"
data-app-id="{{ .Site.Params.comments.cusdis.id }}"
data-page-id="{{ .File.UniqueID }}"
data-page-url="{{ .Permalink }}"
data-page-title="{{ .Title }}"></div>
<div id="cusdis_thread" data-host="{{ $host }}" data-app-id="{{ .Site.Params.comments.cusdis.id }}"
data-page-id="{{ .File.UniqueID }}" data-page-url="{{ .Permalink }}" data-page-title="{{ .Title }}"></div>
<script async defer src="{{ $host }}/js/cusdis.es.js"></script>
<script>
function setCusdisTheme(theme) {
let cusdis = document.querySelector('#cusdis_thread iframe');
if (cusdis) {
window.CUSDIS.setTheme(theme)
window.CUSDIS.setTheme(theme);
cusdis.contentWindow.document.body.style.backgroundColor = window.getComputedStyle(document.body).backgroundColor;
}
}
window.addEventListener('load', function () {
let iframe = document.querySelector("#cusdis_thread iframe");
if (iframe) {
let observer = new MutationObserver(() => {
let scrollHeight = iframe.contentWindow.document.body.scrollHeight;
iframe.style.height = scrollHeight + "px";
});
observer.observe(iframe.contentWindow.document.body, { childList: true, subtree: true });
}
});
window.addEventListener('onColorSchemeChange', (e) => {
setCusdisTheme(e.detail)
})
</script>
</script>
@@ -1,5 +1,5 @@
<div class="disqus-container">
{{ template "_internal/disqus.html" . }}
{{ partial "disqus.html" . }}
</div>
<style>
@@ -2,7 +2,7 @@
{{- $disqusjs := .Site.Params.Comments.disqusjs -}}
{{- if and (not $pc.Disable) (and $disqusjs.Shortname $disqusjs.ApiKey) -}}
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | resources.ToCSS | minify -}}
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | toCSS | minify -}}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
<div class="disqus-container">
@@ -21,8 +21,12 @@
}
function lazyLoadDisqusJS() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
const excludedHosts = ["localhost", "127.0.0.1"];
const hostname = window.location.hostname;
if (excludedHosts.includes(hostname)) {
document.getElementById('disqus_thread').innerHTML =
'Disqus comments not available by default when the website is previewed locally.';
return;
}
@@ -12,6 +12,7 @@
data-input-position="{{- default `top` .inputPosition -}}"
data-theme="{{- default `light` .lightTheme -}}"
data-lang="{{- default `en` .lang -}}"
data-loading="{{- .loading -}}"
crossorigin="anonymous"
async
></script>
@@ -15,11 +15,13 @@
admin: ["{{- .admin -}}"],
distractionFreeMode: false, // Facebook-like distraction free mode
id: md5(location.pathname), // Max Location.pathname Legth:75 https://github.com/gitalk/gitalk/issues/102
proxy: {{- .proxy -}},
});
(function () {
if (
["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1
) {
const excludedHosts = ["localhost", "127.0.0.1"];
const hostname = window.location.hostname;
if (excludedHosts.includes(hostname)) {
document.getElementById("gitalk-container").innerHTML =
"Gitalk comments not available by default when the website is previewed locally.";
return;
@@ -1,4 +1,4 @@
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.21/dist/twikoo.all.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.44/dist/twikoo.all.min.js"></script>
<div id="tcomment"></div>
<style>
.twikoo {
@@ -24,8 +24,11 @@
.twikoo .tk-preview-container,
.twikoo .tk-content,
.twikoo .tk-nick,
.twikoo .tk-send {
color: var(--twikoo-body-text-color-main);
.twikoo .tk-send,
.twikoo .tk-comments-no,
.twikoo .el-input__count,
.twikoo .tk-submit-action-icon {
color: var(--twikoo-body-text-color-main)!important;
}
.twikoo .el-button{
color: var(--twikoo-body-text-color)!important;
@@ -16,7 +16,7 @@
{{- with .Site.Params.comments.waline -}}
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}}
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" "turnstilekey" "turnstileKey" -}}
{{- range $key, $val := . -}}
{{- if ne $val nil -}}
+1 -1
View File
@@ -14,4 +14,4 @@
{{ $description = .Summary }}
{{ end }}
{{ return ($description | plainify)}}
{{ return (replaceRE "\n" " " $description | plainify) }}
+15 -33
View File
@@ -1,38 +1,20 @@
{{- $title := .Title -}}
{{- $pageTitle := .Title -}}
{{- $siteTitle := .Site.Title -}}
{{- $paginator := partial "helper/paginator.html" . -}}
{{- if .IsHome -}}
<!-- Homepage, and it's pagination -->
{{- $title := slice -}}
<!-- Build paginator -->
{{ $pages := where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $pag := .Paginate ($filtered) }}
{{ if .Paginator.HasPrev }}
<!-- Paginated. Append page number to title -->
{{ $title = printf "%s - %s" .Paginator $siteTitle }}
{{ else }}
{{ $title = $siteTitle}}
{{ end }}
{{- else if eq .Kind "term" -}}
<!-- Taxonomy page -->
<!-- Build paginator -->
{{ $notHidden := where .Pages "Params.hidden" "!=" true }}
{{ $pag := .Paginate ($notHidden) }}
<!-- {TAXONOMY_TYPE}: {TAXONOMY_TERM} -->
{{ $title = slice (title .Data.Singular) ": " $title }}
{{ if .Paginator.HasPrev }}
<!-- Add page number-->
{{ $title = $title | append " - " .Paginator }}
{{ end }}
{{ $title = $title | append " - " $siteTitle }}
{{ $title = delimit $title "" }}
{{- if $pageTitle }}
{{- $title = slice $pageTitle -}}
{{- end -}}
{{ return $title }}
{{- if and $paginator $paginator.HasPrev -}}
<!-- Add page number-->
{{ $title = $title | append (printf "Page %d" $paginator.PageNumber) }}
{{- end -}}
{{- if not .IsPage -}}
{{ $title = $title | append $siteTitle }}
{{- end -}}
{{ return delimit $title " - " }}
@@ -1,12 +1,12 @@
{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
{{- $opts := dict "minify" hugo.IsProduction -}}
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
{{- $script := resources.Get "ts/main.ts" | js.Build $opts | fingerprint -}}
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
{{- with resources.Get "ts/custom.ts" -}}
{{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}}
{{- $customScript := . | js.Build $opts -}}
{{- $customScript := . | js.Build $opts | fingerprint -}}
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
{{- end -}}
+1 -1
View File
@@ -1,4 +1,4 @@
{{- $ThemeVersion := "3.24.1" -}}
{{- $ThemeVersion := "3.34.0" -}}
<footer class="site-footer">
<section class="copyright">
&copy;
+1 -1
View File
@@ -22,5 +22,5 @@
<link rel="shortcut icon" href="{{ . | relURL }}" />
{{ end }}
{{- template "_internal/google_analytics.html" . -}}
{{- partial "google_analytics.html" . -}}
{{- partial "head/custom.html" . -}}
+1 -1
View File
@@ -1,3 +1,3 @@
{{ $sass := resources.Get "scss/style.scss" }}
{{ $style := $sass | resources.ToCSS | minify | resources.Fingerprint "sha256" }}
{{ $style := $sass | toCSS | minify | resources.Fingerprint "sha256" }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
@@ -0,0 +1,13 @@
{{/*
This helper is used to generate a background color and text color from a string
Used to generate deterministic colors for tags, categories, etc.
*/}}
{{- $str := . -}}
{{- $hash := hash.FNV32a $str -}}
{{- $h := mod $hash 360 -}}
{{- $backgroundColor := printf "hsl(%d, 60%%, 84%%)" $h -}}
{{- $textColor := printf "hsl(%d, 60%%, 15%%)" $h -}}
{{- return dict "BackgroundColor" $backgroundColor "TextColor" $textColor "Hue" $h -}}
+23
View File
@@ -0,0 +1,23 @@
{{- $pages := "" -}}
{{- if .IsHome -}}
{{ $pages = where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
{{ $pages = where $pages "Params.hidden" "!=" true }}
{{- else if eq .Kind "term" -}}
{{ $pages = where .Pages "Params.hidden" "!=" true }}
{{- else if or (eq .Kind "section") (eq .Kind "taxonomy") -}}
{{ $subsections := .Sections }}
{{ $pages = .Pages | complement $subsections }}
{{ $pages = where $pages "Params.hidden" "!=" true }}
{{- if eq (len $pages) 0 -}}
{{/* See complete logic in list.html */}}
{{- $pages = $subsections -}}
{{- end -}}
{{- end -}}
{{- if $pages -}}
{{ $pages = .Paginate $pages }}
{{- end -}}
{{ return $pages }}
+69 -25
View File
@@ -1,26 +1,70 @@
{{ if gt .Paginator.TotalPages 1 }}
<nav class='pagination'>
{{ $.Scratch.Set "hasPrevDots" false }}
{{ $.Scratch.Set "hasNextDots" false }}
{{- $pag := $.Paginator -}}
{{- if gt $pag.TotalPages 1 -}}
<nav class="pagination" role="navigation" aria-label="pagination">
{{- /* Previous page button */ -}}
<a class="page-link {{ if not $pag.Prev }}disabled{{ end }}"
{{- if $pag.Prev -}}href="{{ $pag.Prev.URL }}" {{- end -}}
aria-label="Previous page"
{{- if not $pag.Prev -}}aria-disabled="true"{{- end -}}>
{{ partial "helper/icon" "chevron-left" }}
</a>
{{ range .Paginator.Pagers }}
{{ if eq . $.Paginator }}
<span class='page-link current'>
{{- .PageNumber -}}
</span>
{{ else if or (or (eq . $.Paginator.First) (eq . $.Paginator.Prev)) (or (eq . $.Paginator.Next) (eq . $.Paginator.Last )) }}
<a class='page-link' href='{{ .URL }}'>
{{- .PageNumber -}}
</a>
{{ else }}
{{ if and (not ($.Scratch.Get "hasPrevDots")) (lt .PageNumber $.Paginator.PageNumber) }}
{{ $.Scratch.Set "hasPrevDots" true }}
<span class='page-link dots'>&hellip;</span>
{{ else if and (not ($.Scratch.Get "hasNextDots")) (gt .PageNumber $.Paginator.PageNumber) }}
{{ $.Scratch.Set "hasNextDots" true }}
<span class='page-link dots'>&hellip;</span>
{{ end }}
{{ end }}
{{ end }}
</nav>
{{ end }}
{{- /* Page numbers logic */ -}}
{{- $window := 4 -}}
{{- $showFirst := true -}}
{{- $showLast := true -}}
{{- /* First page */ -}}
<a class="page-link {{ if eq $pag.PageNumber 1 }}current{{ end }}" aria-label="Page 1"
{{- if eq $pag.PageNumber 1 -}}aria-current="page" {{- end -}}
{{- if ne $pag.PageNumber 1 -}}href="{{ $pag.First.URL }}"{{- end -}}>
1
</a>
{{- /* Left ellipsis - show if current page is > 3 */ -}}
{{- if gt $pag.PageNumber 3 -}}
<span class="page-link pagination-link">
{{ partial "helper/icon" "dots" }}
</span>
{{- end -}}
{{- /* Middle pages - show current and neighbors */ -}}
{{- range $pag.Pagers -}}
{{- if and (gt .PageNumber 1) (lt .PageNumber $pag.TotalPages) -}}
{{- if and (ge .PageNumber (sub $pag.PageNumber $window)) (le .PageNumber (add $pag.PageNumber $window)) -}}
<a class="page-link {{ if eq .PageNumber $pag.PageNumber }}current{{ end }}"
{{- if eq .PageNumber $pag.PageNumber -}}aria-current="page" {{- end -}} href="{{ .URL }}"
aria-label="Page {{ .PageNumber }}">
{{ .PageNumber }}
</a>
{{- end -}}
{{- end -}}
{{- end -}}
{{- /* Right ellipsis - show if current page is < last-2 */ -}}
{{- if lt $pag.PageNumber (sub $pag.TotalPages 2) -}}
<span class="page-link pagination-link">
{{ partial "helper/icon" "dots" }}
</span>
{{- end -}}
{{- /* Last page (if more than 1 page total) */ -}}
{{- if gt $pag.TotalPages 1 -}}
<a class="page-link {{ if eq $pag.PageNumber $pag.TotalPages }}current{{ end }}"
{{- if ne $pag.PageNumber $pag.TotalPages -}}href="{{ $pag.Last.URL }}" {{- end -}}
aria-label="Page {{ $pag.TotalPages }}"
{{- if eq $pag.PageNumber $pag.TotalPages -}}aria-current="page"{{- end -}}>
{{ $pag.TotalPages }}
</a>
{{- end -}}
{{- /* Next page button */ -}}
<a class="page-link {{ if not $pag.Next }}disabled{{ end }}"
{{- if $pag.Next -}}href="{{ $pag.Next.URL }}" {{- end -}}
aria-label="Next page"
{{- if not $pag.Next -}}aria-disabled="true"{{- end -}}>
{{ partial "helper/icon" "chevron-right" }}
</a>
</nav>
{{- end -}}
+3 -3
View File
@@ -38,7 +38,7 @@
</header>
{{- with .Site.Menus.social -}}
<ol class="social-menu">
<ol class="menu-social">
{{ range . }}
<li>
<a
@@ -60,12 +60,12 @@
<ol class="menu" id="main-menu">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
{{ $active := or (eq $currentPage.RelPermalink .URL) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
<li {{ if $active }} class='current' {{ end }}>
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
{{ $icon := default .Pre .Params.Icon }}
{{ if .Pre }}
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://docs.stack.jimmycai.com/configuration/custom-menu.html" .URL }}
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://stack.jimmycai.com/config/menu" .URL }}
{{ end }}
{{ with $icon }}
{{ partial "helper/icon" . }}
+1 -2
View File
@@ -10,8 +10,7 @@
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
{{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }}
{{ $notHidden := where $context.Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $filtered := where $pages "Params.hidden" "!=" true }}
{{ $archives := $filtered.GroupByDate "2006" }}
<div class="widget-archive--list">
+2 -2
View File
@@ -8,9 +8,9 @@
<div class="tagCloud-tags">
{{ range first $limit $context.Site.Taxonomies.tags.ByCount }}
<a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}">
<a href="{{ .Page.RelPermalink }}">
{{ .Page.Title }}
</a>
{{ end }}
</div>
</section>
</section>
-26
View File
@@ -1,26 +0,0 @@
[build]
publish = "exampleSite/public"
[build.environment]
HUGO_VERSION = "0.123.8"
HUGO_THEME = "repo"
[context.production]
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${URL}"
[context.production.environment]
HUGO_ENV = "production"
[context.branch-deploy]
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}"
[context.deploy-preview]
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}"
[[plugins]]
package = "netlify-plugin-hugo-cache-resources"
[plugins.inputs]
# If it should show more verbose logs (optional, default = true)
debug = true
# Relative path to source directory in case you use Hugo's "--s" option
srcdir = "exampleSite"
+9
View File
@@ -0,0 +1,9 @@
name = "hugo-theme-stack"
compatibility_date = "2026-01-25"
[build]
command = "chmod a+x ./.ci/build.sh && ./.ci/build.sh"
[assets]
directory = "demo/public"
not_found_handling = "404-page"