Commit Graph
76 Commits
Author SHA1 Message Date
JimmyandGitHub 752fd5805f fix(image): correct permalink handling for images placed in static folder (#1330)
* fix(image): correct permalink handling for images placed in `static` folder

related: https://github.com/CaiJimmy/hugo-theme-stack/discussions/1307

* Remove urls.AbsURL
2026-04-26 20:20:51 +02:00
Jimmy Cai e0418efe2f chore: update Hugo version to 0.160.1 in build script 2026-04-26 13:43:09 +02:00
JimmyandGitHub 08a8b5d767 feat: codeblock improvements (#1328)
* fix: do not show codeblock copy button if clipboard api is not available

related: https://github.com/CaiJimmy/hugo-theme-stack/issues/1309

* fix: remove duplicated codeblock script in main.ts

* feat: add i18n support to codeblock copy button

* feat: add translation strings for codeblock copy button
2026-04-26 13:40:46 +02:00
JimmyandGitHub 8e3687431f fix: ensure taxonomy widget title is only linked if a taxonomy page exits (#1314)
fix: ensure taxonomy widget title is only linked if a taxonomy page exists
2026-03-21 12:01:29 +01:00
JimmyandGitHub cfcdb20d17 refactor: remove custom scrollbar styles and related variables (#1304) 2026-03-08 13:23:23 +01:00
JimmyandGitHub f13c478718 fix: check if resource exists before accessing .RelPermalink (#1299)
* fix: check if resource exists before accessing `.RelPermalink`

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1297

* Set default value of $result in `helper/image` to dict
2026-03-06 00:13:13 +01:00
JimmyandGitHub bde2914dec chore: Remove featuredImageField from configuration (#1298)
chore: Remove `featuredImageField` from configuration.
2026-03-05 23:56:27 +01:00
JimmyandGitHub f5adf4a273 fix: do not display the date of term pages (#1296) 2026-03-05 18:25:04 +01:00
JimmyandGitHub 07fa7615eb refactor: simplify article-list/tile partial context passing (#1295)
refactor: simplify `article-list/tile` partial context passing and internal usage.
2026-03-05 18:15:05 +01:00
JimmyandGitHub 628bb9a501 feat: use images.AutoOrient in helper/image (#1294)
* feat: use images.AutoOrient in `helper/image`

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1292

* fix: check if IsImageResourceProcessable before using filter

* remove local field

* feat: add configurable image auto-orientation via a new `autoOrient` parameter in site configuration
2026-03-05 17:58:40 +01:00
JimmyandGitHub 11aa9e349a refactor: rename article-footer to article-meta (#1293)
* refactor: rename `article-footer` to `article-meta`, and remove unnecesary structures

* fix: Update default article license URL to point to Creative Commons.
2026-03-05 17:10:35 +01:00
JimmyandGitHub 25bf63778c feat: use thumbnail in section and links image (#1291)
* feat: use thumbnail for section image

* feat: use thumbnail in links image

* fix typo
2026-03-05 13:57:37 +01:00
JimmyandGitHub a95d0e7c85 refactor: use helper/image in links.html (#1290)
* refactor: use `helper/image` in `links.html`

* fix: check for $image existence before accessing
2026-03-05 13:51:34 +01:00
JimmyandGitHub 12f05571cf refactor: make article-list/compact better for term pages (#1289)
* refactor: rename article-time class to article-footer for consistency

* feat: show the number of subpages in `article-compact` when the page is a term
2026-03-05 13:43:55 +01:00
JimmyandGitHub a9a14ce815 feat: hide search results container if no keyword is given (#1288)
feat: hide search results container if no keyword is given and add typing
2026-03-05 12:52:06 +01:00
JimmyandGitHub 0ad02c5c0f refactor: add standardized spacing variables and more style cleanup (#1287)
* refactor: add standardized spacing variables and more style cleanup

* refactor: rename `spacing-xxl` to `spacing-2xl` and introduce `spacing-3xl` for consistent spacing variables.

* refactor: Migrate related content styling to use the `subsection-list` component with updated layout adjustments.

* style: adjust padding values for article list tiles.

* refactor: Introduce shadow variables and dynamic spacing to prevent shadow cutoff in list layouts.

* refactor: relocate dark scheme Mermaid variables within the root scope.
2026-03-05 12:29:48 +01:00
JimmyandGitHub 88468ad84e refactor: cleanup stylesheet (#1286)
* refactor: cleanup stylesheet

* Update assets/scss/partials/article.scss
2026-03-05 10:40:13 +01:00
JimmyandGitHub 3dae60ac7a fix: use IsImageResourceWithMeta to check whether image has width / height attributes (#1285) 2026-03-05 09:23:47 +01:00
22edce91ab feat: add responsive image support (#1283)
* feat: create responsive-image helper

* feat: new responsive-image helper

* feat: Implement responsive image rendering in page content using a new partial and configure image processing widths.

* feat: add `sizes` attribute for enhanced image responsiveness

* feat: add responsive image to page header too

* Check for `.Enabled` before processing image

* style: remove wrong article-list--tile width and height

* feat: add `helper/thumbnail-image` for responsive thumbnails

* feat: enable content image processing and update responsive image `sizes` attributes for improved display.

* fix: get src from the attributes so external image can work correctly

* fix: add missing data-title-escaped

* Update layouts/_partials/article/components/header.html

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat: remove default `true` for thumbnail resize parameter.

* Update layouts/_markup/render-image.html

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update layouts/_partials/helper/thumbnail-image.html

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add original width and height to thumbnail pictures, for case that resize is not enabled

* Update layouts/_partials/helper/thumbnail-image.html

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-04 23:32:33 +01:00
JimmyandGitHub 78800c7379 fix: keep external image url, and use reflect.IsImageResourceProcessable to check for svg and other non-processable image formats (#1282)
* fix: keep external image url, and use reflect.IsImageResourceProcessable to check for svg

* build: update Hugo version to 0.157.0 in the build script.

* docs: remove `Local` return value and simplify `Resource` description in image helper

* Check for reflect.IsImageResourceProcessable before getting color from image

* chore: update minimum Hugo version to 0.157.0
2026-03-04 13:05:17 +01:00
Jimmy Cai 3ca74956a6 ci: update Hugo version to 0.156.0 2026-02-19 17:54:42 +01:00
Jimmy Cai 22b8d091f4 doc(demo): disable cookie consent 2026-02-19 17:50:48 +01:00
JimmyandGitHub bd7a34966c refactor(sidebar): drop support for .Pre and remove old codes (#1271)
* refactor(sidebar): drop support for .Pre and remove old codes

* Simplify
2026-02-19 17:49:50 +01:00
JimmyandGitHub 2be5b48324 feat(list): ability to show article tags on homepage (#1270)
* feat(list): ability to show article tags on homepage

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/880

* Disable showTags by default
2026-02-19 17:45:09 +01:00
JimmyandGitHub 3a0d70ebbd feat(i18n): add i18n support for Markdown alert (#1269)
* docs: add blockquote with custom alert title

* feat: add alert types to i18n and update blockquote rendering

* fix: wrong translation key

* feat: add alert title translation for all supported languages

Done by AI
2026-02-18 20:07:59 +01:00
JimmyandGitHub 2058c1ff6d refactor: create a generic taxonomy widget (#1268)
* refactor: introduce a generic taxonomy widget and refactor existing category and tag cloud widgets to use it.

* feat: Implement optional title linking for taxonomy widgets and enable parameter customization for taxonomy partials.

* refactor: remove fallback to taxonomy page title for widget display

Because this field always exists. I think it's better to let user customize via widget params

* Update layouts/_partials/widget/taxonomy.html

* refactor: check for .Params.taxonomy existence before accessing
2026-02-18 18:56:15 +01:00
d6448148cf feat: add option to set a custom canonical url (#1267)
* add option to set a custom canonical url

* style: use `with` to load cannonicalurl

* style: change to canonicalUrl

Frontmatter is case-insensitive so it does not matter

---------

Co-authored-by: FarisZR <35614734+FarisZR@users.noreply.github.com>
2026-02-17 20:01:23 +01:00
JimmyandGitHub 475c956fd6 style: format TOML files (#1266)
* style: format TOML files

* style: format wrangler.toml
2026-02-17 19:20:09 +01:00
JimmyandGitHub b4e44fda57 fix: enhance image caption handling by using title attribute if available (#1265)
* fix: enhance image caption handling by using title attribute if available

* feat: support markdown syntax inside image caption
2026-02-17 18:38:06 +01:00
JimmyandGitHub 3806cc9230 fix: set width of left and right sidebars to 100% (#1264)
This prevents the width from changing when the left or right sidebar does not have enough content to stretch to 100%.
2026-02-17 18:10:33 +01:00
Jimmy Cai 99a8fd9013 docs: Update demo and documentation URLs 2026-02-17 13:48:49 +01:00
JimmyandGitHub 7f47cdf165 fix: check if favicon exists before accessing permalink (#1259) 2026-02-01 13:11:42 +01:00
JimmyandGitHub 768e7de697 refactor: update RSS template to the latest one given by Hugo, and change page output logic (#1257)
* refactor: rename `home.rss.xml` to `rss.xml`

* refactor: update RSS template to the latest one given by Hugo.

Output pages with the same logic as in normal site by using `helper/pages`
2026-01-30 15:27:32 +01:00
JimmyandGitHub 00069b2c45 feat: add muted attribute and refine autoplay condition for video shortcode (#1256) 2026-01-30 15:09:33 +01:00
JimmyandGitHub 31022581d8 refactor: image logic in page (#1255)
* fix: add SVG check in helper/image before accessing .Width and .Height

* refactor: drop image resizing logic in render-image, and use helper/image to process image

* fix: render-image $permalink not correct
2026-01-30 15:07:14 +01:00
Jimmy Cai ff2e308445 fix: correct pluralization of 'minute' in English reading time. 2026-01-27 14:04:16 +01:00
JimmyandGitHub 017fbf982d chore: update Traditional Chinese localization files (#1251)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1222
2026-01-27 12:49:44 +01:00
JimmyandGitHub bc54cecf0a refactor: centralize page filtering logic, and allow sort by lastmod (#1250)
* refactor: migrate page visibility control from `Params.hidden` to the new `build.list` parameter.

* refactor: centralize page filtering logic into a new `helper/pages.html` partial

* feat: introduce `SortBy` parameter to enable sorting pages by last modified date

* refactor: extract page sorting logic into a new `pages-sort.html` partial
2026-01-27 12:34:15 +01:00
JimmyandGitHub deceb17144 refactor: migrate page visibility control from Params.hidden to the new build.list parameter. (#1249)
* refactor: migrate page visibility control from `Params.hidden` to the new `build.list` parameter.

* Rename rss.xml to home.rss.xml
2026-01-27 12:00:40 +01:00
Jimmy Cai dc0d105e7c fix: correct global site context access for the home page link in the sidebar 2026-01-27 00:05:05 +01:00
JimmyandGitHub 33b7de9457 refactor: use .Site.Home.RelPermalink for home page links in the sidebar (#1248)
refactor: use `.Site.Home.RelPermalink` for home page links in the sidebar.
2026-01-26 23:59:40 +01:00
JimmyandGitHub 7d4bfa9fc0 refactor: simplify sidebar avatar configuration and don't resize (#1247) 2026-01-26 23:58:18 +01:00
JimmyandGitHub ab17b22c77 refactor: get favicon from assets folder (#1246) 2026-01-26 23:49:27 +01:00
Jimmy Cai 9a4ee4fc33 fix: update Go module path to include /v4. 2026-01-26 22:54:42 +01:00
JimmyandGitHub 0f33b3efb7 feat: add collapsible table of contents for smaller screens (#1245)
* refactor: create partial/article/components/toc

* feat: add collapsible table of contents for smaller screens
2026-01-26 22:28:27 +01:00
JimmyandGitHub 3a03d69502 refactor: move default parameter values from template logic to params.toml (#1244) 2026-01-26 15:50:18 +01:00
Jimmy Cai 3b753c9cc0 release: prepare for v4.0.0 2026-01-26 14:20:10 +01:00
JimmyandGitHub f646097afe doc: update demo links in README
Removed bullet points from demo links in README.
2026-01-26 14:15:46 +01:00
JimmyandGitHub 258a71e21a fix: mobile menu glitch on collapsing (#1243) 2026-01-26 14:13:16 +01:00
JimmyandGitHub a069e975aa style: remove extra margin in article description (#1242) 2026-01-26 13:52:10 +01:00
JimmyandGitHub 211bf65153 feat: better demo site (#1241)
* demo: add image-gallery post

* demo: change language weight

* demo: add multilanguage about page

* demo: change title and url

* demo: add shortcode documentation with multi-language support

* demo: improve markdown guide post

* demo: improve Math Typesetting post

* demo: rename Markdown Syntax Guide post

* demo: remove emoji support post

* demo: remove placeholder text post

* demo: remove rich-content post

* demo: rename image gallery page bundle

* demo: add multilingual `Documentation` category

* demo: Increase pagination pager size from 3 to 5.

* demo: add multilingual links, search, and archives pages

* demo: remove `ar` from demosite
2026-01-26 13:49:47 +01:00
Jimmy 0542fed42e fix: avoid site name appearing twice in the title (#1240) 2026-01-26 11:19:05 +01:00
Jimmy Cai b1c5986b2f style: fix <select> padding in iOS Safari 2026-01-26 00:13:36 +01:00
JimmyandGitHub fe7a0566df style: remove vendor style of <select> in i18n switch (#1238)
This removes the annoying left padding
2026-01-26 00:03:27 +01:00
JimmyandGitHub 35cba14cde feat: if current page has i18n version, language switcher will redirect to there instead of homepage (#1237)
feat: if current page has i18n version, language switcher will redirect to there
2026-01-25 23:55:50 +01:00
Jimmy Cai d002c0d0d9 refactor: also remove image resize logic in search.json 2026-01-25 23:44:47 +01:00
JimmyandGitHub ae0de75992 refactor: remove Vibrant.js (#1236)
* refactor: migrate image color extraction from client-side JavaScript to server-side Hugo.

* fix: check if image exists before accessing .Resource
2026-01-25 23:42:28 +01:00
JimmyandGitHub 067bcdb370 refactor: image handling logic + support for external images (#1235)
* refactor: simplify image partial logic, remove generation of different image sizes

* Remove `defaultImage.opengraph` configuration from `params.toml`.
2026-01-25 23:29:41 +01:00
JimmyandGitHub b1ddad1d22 feat: upgrade to PhotoSwipe v5 (#1233)
* refactor: migrate external resource definitions from YAML to TOML format

* feat: upgrade to PhotoSwipe v5
2026-01-25 23:13:34 +01:00
JimmyandGitHub 9d9ecc4d00 fix: error when no page is found (#1234) 2026-01-25 23:12:28 +01:00
JimmyandGitHub 5f1ab2bc76 refactor: migrate to new template system introduced in Hugo v0.146.0 (#1232)
See: https://gohugo.io/templates/new-templatesystem-overview/
2026-01-25 22:42:00 +01:00
JimmyandGitHub 633c8c6b9f refactor: Use RelPermalink for internal links (#1231) 2026-01-25 22:31:58 +01:00
JimmyandGitHub c872a77edb refactor: migrate i18n files from YAML to TOML format and simplify structure (#1230)
* refactor: migrate i18n files from YAML to TOML format and simplify structure

* refactor: make translation file adjust to gohugoio/locales language code so date translation can work properly

* refactor: use hyphens instead of underscores for i18n, because that's how Hugo pick the translation file

* docs: update comments for i18n language availability and CJK language detection in hugo.toml.
2026-01-25 21:01:32 +01:00
JimmyandGitHub 406fcef7cd refactor: use TOML for configuration file (#1228)
* refactor: remove jsconfig.json

* chore: remove devcontainer config

* refactor: migrate Hugo configuration from `hugo.yaml` to dedicated `module.toml` and `params.toml` files, and update minimum Hugo version.

* refactor: migrate demo site configuration from `hugo.yaml` to `config/_default/*.toml`

* feat: enable local sidebar avatar for demo site and relocate its image to demo assets.

* feat: migrate demo site to Hugo Modules for theme management.

* fix: wrong config folder name
2026-01-25 19:51:10 +01:00
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
JimmyandGitHub 2612ca87dc feat: allow specify alt for link's image (#1198) 2025-11-01 22:14:52 +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
JimmyandGitHub 2f47d14a8a fix: add missing object-fit: cover to section-image (#1196) 2025-11-01 20:43:19 +01:00
JimmyandGitHub 8cb1646198 style: remove unused count class in tag cloud (#1195) 2025-10-31 23:48:40 +01:00