Commit Graph

18 Commits

Author SHA1 Message Date
Andreas Deininger 175cf888d5 fix: eliminate deprecation warnings with hugo version 0.156.0 (#702)
* Fix deprecation warning with latest hugo version 0.156.0

* fix: use `hugo.Data` to replace the discarded `.Site.Data`

* chore(hugo): update Hugo version requirements to 0.156.0

---------

Co-authored-by: Cell <1024@lruihao.cn>
2026-02-27 15:46:31 +08:00
Cell b4008081d7 feat(file-tree): enhance shortcode with name param and deprecated fullRootName param
// ignore-for-release
2026-01-14 18:18:26 +08:00
Cell fdfd772100 feat(File Tree): add file-tree shortcode support (#685)
* feat(File Tree): add `file-tree` shortcode support

* feat(file-tree): add ignoreList parameter to file-tree shortcode

* feat(file-tree): enhance file-tree shortcode with ignoreList and folderSlash options

* feat(file-tree): enhance file-tree shortcode to support data mode

* feat(file-tree): enhance file-tree shortcode to support file mode

* feat(file-tree): improve content parsing in file-tree shortcode

* feat(file-tree): improve root path validation and error handling in filesystem mode

* test(file-tree): add unit tests for `file-tree` shortcode

* feat(file-tree): add file-tree code block rendering support

* refactor(file-tree): extract filesystem scanning to get-file-tree partial

Move directory traversal and root path validation to a separate partial function,
consolidating all filesystem-related logic in one place. This simplifies the
shortcode implementation and ensures a unified data format for rendering.

* docs(readme): extend code fence and shortcode support for file tree in documentation

* feat(file-tree): add fullRootName parameter for root path display in file tree

* feat(file-tree): add language parameter to get-file-tree function

* feat(file-tree): add highlightList parameter for file-tree shortcode

* perf(file-tree): add level param for get-file-tree function to descend only level directories deep
2026-01-14 16:01:22 +08:00
Cell fb300f2b16 fix(code): code highlighting not styled for typeit shortcode (#681) 2026-01-05 14:58:52 +08:00
Cell 3865162f6d fix(i): error calling merge: destination must be a map, got <nil> 2025-12-30 16:39:59 +08:00
Cell d55d53741d fix: dict type page parameters fall back to site parameters using merge behavior (#670)
> The `Param` method on a `Page` object looks for the given `KEY` in page parameters, and returns the corresponding value. If it cannot find the `KEY `in page parameters, it looks for the `KEY` in site parameters. If it cannot find the `KEY` in either location, the Param method returns `nil`.
>
> See: https://gohugo.io/methods/page/param/

So `.Page.Param` is only suitable for simple types.
2025-12-30 11:23:25 +08:00
Cell 7efb9fc3ac perf: add bluesky shortcode with remote JSON retrieval and styling 2025-12-23 11:10:38 +08:00
Cell 9bcdbe3325 feat: add env shortcode for conditional content rendering based on Hugo environment 2025-12-22 14:53:37 +08:00
Cell 3f14576073 feat: add blacklist option for image optimisation and adapt Hugo 0.153.0+ (#666)
* feat: add blacklist option for image optimisation and enhance shortcode parameters

To ensure compatibility with Hugo 0.153.0, converting GIFs to WebP is prohibited. (gohugoio/hugo#14282)

* feat: enhance image plugin with Matches parameter for better resource handling and improve featured image rendering
2025-12-21 23:42:15 +08:00
Cell 051f45a73c feat: update version shortcode with deprecated type 2025-12-20 20:29:41 +08:00
Cell 4d95fd8d30 refactor: add code block render hooks for xml feed content (#651) 2025-12-20 14:38:12 +08:00
Cell f2b6218edc refactor: consolidate code block rendering and enhance styling features (#665)
reference issues: #312, #476
2025-12-19 23:31:18 +08:00
Cell c35dce56d0 refactor: table wrapper via table render hook
resolve #503
2025-12-19 14:10:33 +08:00
Cell fe129dd207 feat: add APlayer shortcode and audio support (#650)
* docs: improve error message clarity for shortcode parent block validation

* feat: add APlayer shortcode and audio support

* feat: support both APlayer and MetingJS

* feat: initialize APlayer when content decrypted
2025-10-21 15:47:04 +08:00
Cell 56836eb077 feat: add tabs and tab shortcodes support (#634)
* feat: add tabs and tab shortcodes support

Powered by https://github.com/github/tab-container-element

* fix: adjust tab-container styles for improved layout and responsiveness

- [x] Underline Style (Default)
- [x] Pill Style
- [x] Card Style
- [x] Segment Style

* test: add tabs comprehensive test cases

* style: code optimization

* fix: add tabs support in home scope

* docs: add `<tab-container>` element reference to README files

* feat: enhance tab-container with loading mixin and simplify code

* refactor: update variable references to use root prefix in styles

* docs: add tabs shortcode support to README files

* fix: ensure shortcode is enclosed within a tabs block

* feat: add responsive design for tab-container on smaller screens

* test: remove unnecessary placement attribute for segment tabs

* refactor: remove unused vertical attribute from tabs shortcode

* fix: set default tab type to 'underline' for consistency

* refactor: update tab-button and tab-panel selectors for improved specificity
2025-09-11 22:59:33 +08:00
Cell 3e8bdfd8f9 ♻️ Refactor: global/site/page scope state management (#610)
*  Perf: adjust global/site scope state management

*  Perf: adjust page scope state management
2025-07-03 12:48:32 +08:00
Cell 0ce74d82f8 ♻️ Refactor: mathematical formula render (#609)
*  Feat: add support for math passthrough render hook

*  Feat: enable copy-tex extension for KaTeX server-side render

*  Feat: enhance mathematical rendering support with KaTeX and MathJax configurations

*  Feat: add KaTeX error handling and custom macros map config

*  Feat: add MathJax client-side rendering as an alternative math engine

*  Feat: update MathJax CDN configuration and enhance asset loading parameters

* 🔥 Feat: remove unused KaTeX math rendering scripts and update KaTex

*  Feat: make \KaTeX command work in MathJax

*  Feat: update KaTeX CDN links for Twikoo integration

*  Perf: Math in content encryption

* 🐛 Fix: update class name from 'fi-row' to 'fi-raw' in raw.html shortcode

* 🐛 Fix: correct MathJax math delimiters in load-mathjax.js

*  Feat: enhance MathJax configuration with additional tex parameters and update asset handling

* 🐛 Fix: adjust KaTeX display overflow behavior
2025-06-30 12:58:48 +08:00
Cell a5614505bc ♻️ Refactor: add underscore to partials and shortcodes directory names (#608) 2025-06-19 12:29:30 +08:00