### Install Hexo Theme AnZhiYu via Git Source: https://github.com/anzhiyu-c/hexo-theme-anzhiyu/blob/dev/README_EN.md Install the latest version of the AnZhiYu theme directly into your Hexo blog's themes directory using Git. This is the recommended installation method. ```powershell git clone -b main https://github.com/anzhiyu-c/hexo-theme-anzhiyu.git themes/anzhiyu ``` -------------------------------- ### Math Post Example with KaTeX Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Example of a post front matter enabling KaTeX and embedding inline and block math formulas. ```markdown --- title: Math Post katex: true --- Inline: $E = mc^2$ Block: $$ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} $$ ``` -------------------------------- ### Install hexo-theme-anzhiyu and Dependencies Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Clone the theme, install required renderers, copy the configuration file, and enable the theme in the root config. Finally, build and serve the site. ```bash # Clone theme into themes/anzhiyu git clone -b main https://github.com/anzhiyu-c/hexo-theme-anzhiyu.git themes/anzhiyu # Install required renderers npm install hexo-renderer-pug hexo-renderer-stylus --save # Copy theme config to root for override (prevents config loss on updates) # macOS / Linux cp -rf ./themes/anzhiyu/_config.yml ./_config.anzhiyu.yml # Windows: manually copy themes/anzhiyu/_config.yml → _config.anzhiyu.yml # Enable the theme in the root _config.yml echo "theme: anzhiyu" >> _config.yml # Build & serve hexo clean && hexo g && hexo s ``` -------------------------------- ### Install Pug and Stylus Renderers Source: https://github.com/anzhiyu-c/hexo-theme-anzhiyu/blob/dev/README_EN.md If your Hexo project does not have renderers for Pug and Stylus, install them using npm. This is a prerequisite for certain theme functionalities. ```bash npm install hexo-renderer-pug hexo-renderer-stylus --save ``` -------------------------------- ### Configure Math Rendering Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Supports KaTeX and MathJax. Enable `per_page: false` to load the renderer only on posts that declare `mathjax: true` or `katex: true` in front matter. ```yaml # _config.anzhiyu.yml math: katex: enable: true per_page: false mathjax: enable: true per_page: false ``` -------------------------------- ### Stylized Introduction Card Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Renders a stylized introduction card with a cover image, tip badge, title, logo, and call-to-action link. Pass parameters directly. ```markdown {% intCard https://example.com, https://example.com/cover.jpg, 最爱, My Favorite App, https://example.com/logo.png, App Name, A short subtitle here %} ``` -------------------------------- ### Enable KaTeX Math Rendering Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Enable KaTeX for rendering mathematical formulas. Set `per_page` to `false` to control rendering via post front matter. ```yaml katex: enable: true per_page: false # add "katex: true" to post front matter to enable per-post hide_scrollbar: true ``` -------------------------------- ### Configure PWA and Service Worker Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Enable Progressive Web App (PWA) support and configure startup images, manifest, and icons. ```yaml pwa: enable: true startup_image_enable: true manifest: /manifest.json theme_color: var(--anzhiyu-main) apple_touch_icon: /img/siteicon/apple-icon-180.png favicon_32_32: /img/siteicon/32.png favicon_16_16: /img/siteicon/16.png ``` -------------------------------- ### Enable MathJax Math Rendering Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Enable MathJax for rendering mathematical formulas. This is an alternative to KaTeX. ```yaml mathjax: enable: false per_page: false ``` -------------------------------- ### Configure AI Article Summary Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Enables an AI-generated abstract box at the top of each post. Supports local mode (reads post headings) and Tianli API mode. Configuration includes GPT name, mode, toggle button, random variations, minimum word count, API key, and Referer. ```yaml # _config.anzhiyu.yml post_head_ai_description: enable: true gptName: AnZhiYu mode: local # local or tianli switchBtn: false # show toggle between local/tianli randomNum: 3 # max random variations per post basicWordCount: 1000 # minimum characters before triggering AI summary key: YOUR_TIANLI_KEY # required for tianli mode Referer: https://yourblog.com/ ``` -------------------------------- ### Configure Comment Systems Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Supports Valine, Waline, Twikoo, Artalk, and Giscus. Enable up to two simultaneously; the first is the default. Configuration options are provided for each system. ```yaml # _config.anzhiyu.yml comments: use: Twikoo # or Waline, Valine, Artalk, Giscus — comma-separate two for dual text: true lazyload: false count: false twikoo: envId: https://twikoo.example.com region: visitor: false waline: serverURL: https://waline.example.com pageview: false valine: appId: YOUR_LEANCLOUD_APP_ID appKey: YOUR_LEANCLOUD_APP_KEY placeholder: Leave a comment… lang: zh-CN giscus: repo: username/repo-name repo_id: R_xxxxxxxxxxxx category_id: DIC_xxxxxxxxxxxx theme: light: light dark: dark ``` -------------------------------- ### Configure Search Functionality Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Supports local search, Algolia, and Docsearch. Only one should be enabled at a time. Configuration options are provided for each search type. ```yaml # _config.anzhiyu.yml — Local search (requires hexo-generator-searchdb) local_search: enable: true preload: true # Algolia search (requires hexo-algoliasearch) algolia_search: enable: false hits: per_page: 6 # Docsearch (Algolia crawler-powered) docsearch: enable: false appId: YOUR_APP_ID apiKey: YOUR_SEARCH_ONLY_API_KEY indexName: YOUR_INDEX_NAME ``` -------------------------------- ### Implement Reveal-on-Click Content Hiding with `hideInline`, `hideBlock`, `hideToggle` Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt These plugins hide content until revealed by a click. `hideInline` hides text directly, `hideBlock` creates a revealable block, and `hideToggle` uses a `
` element for free toggling. ```markdown Inline secret: {% hideInline This text is hidden,Click to reveal,#e91e63,#fff %} {% hideBlock Show Answer, #2196f3, #fff %} The answer is **42**. Markdown is rendered inside the block. {% endhideBlock %} {% hideToggle Spoiler Warning %} This uses a `
` element — it can be toggled open and closed freely. {% endhideToggle %} ``` -------------------------------- ### Override Theme Configuration Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Customize theme settings by editing the `_config.anzhiyu.yml` file in your blog's root directory. Keys in this file take precedence over the theme's default configuration. ```yaml # _config.anzhiyu.yml (excerpt showing key sections) # Navigation menu menu: 文章: 归档: /archives/ || anzhiyu-icon-box-archive 分类: /categories/ || anzhiyu-icon-shapes 标签: /tags/ || anzhiyu-icon-tags # Code block appearance highlight_theme: mac # darker / pale night / light / ocean / mac / mac light highlight_copy: true highlight_lang: true highlight_shrink: false highlight_height_limit: 330 # px # Homepage top banner home_top: enable: true title: 生活明朗 subTitle: 万物可爱。 siteText: anheyu.com banner: tips: 新品主题 title: Theme-AnZhiYu image: https://example.com/banner.webp link: https://docs.anheyu.com/ # Dark mode darkmode: enable: true button: true autoChangeMode: 1 # 1 = follow system; 2 = 18:00–06:00; false = manual only # Theme accent color theme_color: enable: true main: "#425AEF" dark_main: "#f2b94b" # Article cover – random fallback pool cover: index_enable: true default_cover: - https://example.com/cover1.jpg - https://example.com/cover2.jpg # CDN provider for internal and third-party assets CDN: internal_provider: local # local / jsdelivr / unpkg / cdnjs / cbd / … third_party_provider: cbd version: true ``` -------------------------------- ### Configure CDN Asset Resolution Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt The `before_generate` event resolves asset URLs using the `CDN` config block. Supported providers include `local`, `jsdelivr`, `unpkg`, `cdnjs`, `elemecdn`, `onmicrosoft`, `cbd`, `anheyu`, and `custom`. Version appending can be controlled by `version: true`. ```yaml # _config.anzhiyu.yml CDN: internal_provider: local # Serve theme JS/CSS from local build output third_party_provider: jsdelivr # Load plugins via jsDelivr CDN version: true # Append @version to CDN URLs # Override individual assets (optional) option: twikoo: https://cdn.example.com/twikoo.min.js valine: https://cdn.example.com/Valine.min.js # Custom format template (when provider is "custom") # Available tokens: ${name}, ${version}, ${file}, ${min_file}, ${cdnjs_name}, ${min_cdnjs_file} custom_format: https://my-cdn.example.com/${name}@${version}/${min_file} ``` -------------------------------- ### Override Theme Configuration (Windows) Source: https://github.com/anzhiyu-c/hexo-theme-anzhiyu/blob/dev/README_EN.md For Windows users, copy the theme's configuration file (`_config.yml` from the theme directory) to your Hexo root directory and rename it to `_config.anzhiyu.yml`. This method facilitates theme updates by preserving custom configurations. ```powershell Copy-Item -Path ./themes/anzhiyu/_config.yml -Destination ./_config.anzhiyu.yml ``` -------------------------------- ### Configure Weighted Tag Cloud - `cloudTags` Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Used in `layout/includes/widget/card_tags.pug` to render a weighted tag cloud. Options mirror `_config.anzhiyu.yml` settings for `aside.card_tags`. ```yaml # Used in layout/includes/widget/card_tags.pug # Options mirror _config.anzhiyu.yml aside.card_tags: aside: card_tags: enable: true limit: 40 # 0 = show all tags color: false # true = random color per tag highlightTags: # Tags rendered with accent color - Hexo - JavaScript ``` -------------------------------- ### Create Image Galleries with `gallery` and `galleryGroup` Tag Plugins Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt The `gallery` plugin renders a justified gallery from Markdown image syntax or a JSON endpoint. `galleryGroup` creates a grouped gallery card linking to a sub-album page. ```markdown {% gallery true, 200, 6 %} ![Photo 1](https://example.com/p1.jpg "Caption 1") ![Photo 2](https://example.com/p2.jpg) ![Photo 3](https://example.com/p3.jpg "Caption 3") {% endgallery %} {% gallery url, https://api.example.com/album.json, true, 220, 10 %} {% endgallery %} {% galleryGroup Travel /album/travel/ https://example.com/travel-cover.jpg %} {% galleryGroup Food /album/food/ https://example.com/food-cover.jpg %} ``` -------------------------------- ### Override Theme Configuration (macOS/Linux) Source: https://github.com/anzhiyu-c/hexo-theme-anzhiyu/blob/dev/README_EN.md For macOS and Linux users, copy the theme's configuration file to the Hexo root directory and rename it to `_config.anzhiyu.yml`. This allows for easier theme updates without losing custom settings. ```bash cp -rf ./themes/anzhiyu/_config.yml ./_config.anzhiyu.yml ``` -------------------------------- ### Configure Aside Sidebar Widgets Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Enable and configure various widgets for the aside sidebar, including author bio, announcements, social media QR codes, recent posts, tags, archives, and web info. ```yaml aside: enable: true position: right # left or right mobile: true card_author: enable: true description: A short bio shown under the avatar. card_announcement: enable: true content: Welcome to my blog! card_weixin: enable: true face: https://example.com/wechat-qr-front.png backFace: https://example.com/wechat-qr-back.png card_recent_post: enable: true limit: 5 sort: date # date or updated card_tags: enable: true limit: 40 color: false highlightTags: - Hexo card_archives: enable: true type: monthly format: MMMM YYYY order: -1 limit: 8 card_webinfo: enable: true post_count: true last_push_date: false ``` -------------------------------- ### Display Images with `image` and `inlineimage` Tag Plugins Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt The `image` plugin renders block images with options for alt text, width, height, and background color. `inlineimage` and `inlineImg` render inline images sized to the line height. ```markdown {% image https://example.com/photo.jpg, alt=A landscape photo, width=80%, bg=#f0f0f0 %} {% image /img/diagram.png, alt=Architecture diagram, width=600px, height=400px %} Inline emoji: {% inlineimage https://example.com/emoji.png, height=22px %} Inline icon: {% inlineImg /img/icon.svg 20px %} ``` -------------------------------- ### Create Collapsible Content with `folding` Tag Plugin Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Use the `folding` tag plugin to create HTML `
`/`` collapsible blocks. The first argument can set the `open` attribute or other HTML attributes, and the second argument is the summary title. ```markdown {% folding Click to expand %} This content is hidden by default. **Markdown** is supported inside. {% endfolding %} {% folding open, Expanded by default %} This block starts expanded because the first argument is `open`. {% endfolding %} ``` -------------------------------- ### Configure Hexo Theme Source: https://github.com/anzhiyu-c/hexo-theme-anzhiyu/blob/dev/README_EN.md Apply the AnZhiYu theme by updating the `theme` property in your Hexo project's main configuration file (`_config.yml`). ```yaml theme: anzhiyu ``` -------------------------------- ### Render Navigation Links - `catalog_list` Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Renders a list of all items of a given Hexo local data type (e.g., `categories` or `tags`) as navigable links. Used on category/tag index pages. ```pug // In a Pug template: // != catalog_list('categories') // != catalog_list('tags') // Produces HTML like: //
// Frontend //
``` -------------------------------- ### Render Tip Blocks with `tip` Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt The `tip` tag plugin renders a simple tip block. You can assign a CSS class to the tip for custom styling, which maps to styles defined in `source/css/_tags/tip.styl`. ```markdown {% tip info %} An informational tip rendered with **Markdown** support inside. {% endtip %} {% tip warning %} A warning tip — the class name maps to CSS in `source/css/_tags/tip.styl`. {% endtip %} ``` -------------------------------- ### Mermaid Diagram Rendering Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Renders a Mermaid diagram. Ensure `mermaid.enable: true` is set in `_config.anzhiyu.yml`. ```markdown {% mermaid %} graph TD A[Start] --> B{Is it working?} B -- Yes --> C[Great!] B -- No --> D[Debug] D --> B {% endmermaid %} ``` -------------------------------- ### Friend Links with YAML Configuration Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Renders a friend-links section using YAML configuration within the tag block. Supports 'anzhiyu' style or default flex-card. ```markdown {% flink %} - class_name: Friends class_desc: My blog friends flink_style: anzhiyu link_list: - name: Alice's Blog link: https://alice.example.com avatar: https://alice.example.com/avatar.png descr: Sharing tech and life - name: Bob's Corner link: https://bob.example.com avatar: https://bob.example.com/avatar.jpg descr: Photography and travel {% endflink %} ``` -------------------------------- ### Create Flex Container Buttons with `btns` and `cell` Tag Plugins Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt The `btns` tag plugin creates a flex container for button cards, while `cell` renders individual button cards. Each cell can include a title, a link, and an image or icon. ```markdown {% btns rounded grid5 %} {% cell Title One, /page-one/, https://example.com/img1.png %} {% cell Title Two, /page-two/, https://example.com/img2.png %} {% cell Icon Cell, /page-three/, anzhiyu-icon-star %} {% endbtns %} ``` -------------------------------- ### Implement Tabbed Content with `tabs` Tag Plugin Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Use the `tabs` tag plugin to create tabbed content blocks. Tabs are defined using `` and `` comments. An optional second argument can specify the default active tab. ```markdown {% tabs demo-tabs, 2 %} Content of the **first** tab. Content of the second tab — the `@icon` suffix adds an icon to the tab button. Content of the third tab, active by default (index 2). {% endtabs %} ``` -------------------------------- ### Generate Page Description Meta Tag - `page_description` Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Returns a sanitized, truncated (150-character) plain-text description for the `` tag. To set a custom description per post, use front matter. ```pug // Inside head.pug — already wired up by the theme: // meta(name='description', content=page_description()) // To set a custom description per post, use front matter: --- title: My Post description: A custom 150-char max description for SEO purposes. --- ``` -------------------------------- ### Render Styled Anchor Buttons with `btn` Tag Plugin Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Use the `btn` tag plugin to render styled anchor buttons. Options control color and layout. Available colors include default, blue, pink, red, purple, orange, and green. Layout options are outline, center, block, and larger. ```markdown {% btn url, text, icon, option %} option values: color (default/blue/pink/red/purple/orange/green), outline, center, block, larger ``` ```markdown {% btn /about/, About Me, anzhiyu-icon-paper-plane, blue %} {% btn https://github.com/, GitHub, anzhiyu-icon-github, outline center larger %} {% btn /archives/, All Posts,, block %} ``` -------------------------------- ### Site Grouping with Site Cards Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Renders screenshot-based site cards, optionally grouped under a heading. Use within Markdown content. ```markdown {% sitegroup My Recommended Sites %} {% site Site Title, url=https://example.com, screenshot=https://example.com/screenshot.png, avatar=https://example.com/avatar.png, description=A great site %} {% site Another Site, url=https://another.com, screenshot=https://another.com/shot.png %} {% endsitegroup %} ``` -------------------------------- ### Inline Text Decorators Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Provides six inline tags for text decoration: underline (`u`), emphasis (`emp`), wavy underline (`wavy`), strikethrough (`del`), keyboard key (`kbd`), and password (`psw`). ```markdown {% u underlined text %} ``` ```markdown {% emp emphasized text %} ``` ```markdown {% wavy wavy-underline text %} ``` ```markdown {% del deleted text %} ``` ```markdown Press {% kbd Ctrl %} + {% kbd C %} to copy. ``` ```markdown Hidden password: {% psw mysecretpassword %} ``` -------------------------------- ### Render Styled Callout Blocks with `note` and `subnote` Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Use the `note` or `subnote` tag plugins to create styled callout blocks within your Markdown content. You can specify styles like 'simple', 'modern', 'flat', or 'disabled', and optionally include a Font Awesome icon. ```markdown {% note flat %} This is a flat-style note. Markdown is rendered inside. {% endnote %} {% note blue modern %} A **blue** modern-style note with bold text. {% endnote %} {% note fa-circle-info flat %} A flat note with a Font Awesome info icon. {% endnote %} {% subnote simple %} `subnote` produces the same output — use it for nested contexts. {% endsubnote %} ``` -------------------------------- ### Configure Random Cover Image Assignment Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt A `before_post_render` filter that automatically assigns a random cover image to posts without one. The pool of images is defined in `_config.anzhiyu.yml`. To disable a cover for a specific post, set `cover: false` in front matter. ```yaml # _config.anzhiyu.yml cover: default_cover: - https://example.com/img/cover1.jpg - https://example.com/img/cover2.jpg - https://example.com/img/cover3.webp # To disable a cover for a specific post, set cover: false in front matter: --- title: No Cover Post cover: false --- ``` -------------------------------- ### Paragraph and Span with Custom Classes Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Renders a `

` or `` tag with a custom CSS class. Useful for applying theme utility classes within Markdown. ```markdown {% p h2, This renders as a styled h2-like paragraph %} ``` ```markdown {% span red, This is a red inline span %} ``` -------------------------------- ### Archive List Widget Helper Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Generates the archive list HTML for the sidebar widget, supporting monthly or yearly grouping with a configurable display limit. ```javascript // Called from layout/includes/widget/card_archives.pug // Options mirror _config.anzhiyu.yml aside.card_archives: aside: card_archives: enable: true type: monthly # yearly or monthly format: MMMM YYYY # moment.js format string order: -1 # -1 = newest first, 1 = oldest first limit: 8 # 0 = show all ``` -------------------------------- ### DogeCloud Video Player Embedding Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Embeds a DogeCloud video player for videos hosted on DogeCloud CDN. Requires video ID and verification code. ```markdown {% dogeplayer 12345 abc123vcode %} ``` -------------------------------- ### Native HTML5 Audio/Video Embedding Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Embeds native HTML5 audio or video players. The `videos` tag acts as a multi-column container for multiple `video` tags. ```markdown {% audio https://example.com/track.mp3 %} ``` ```markdown {% video https://example.com/clip.mp4 %} ``` ```markdown {% videos , 2 %} {% video https://example.com/clip1.mp4 %} {% video https://example.com/clip2.mp4 %} {% endvideos %} ``` -------------------------------- ### Render Vertical Timeline with `timeline` Tag Plugin Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt The `timeline` tag plugin renders a vertical timeline. An optional headline and color class can be set as the first arguments. Each timeline event is marked by `` and `` comments. ```markdown {% timeline 2024 Development Log, blue %} Released **v1.5.0** with dark mode improvements. Added AI summary feature and comment barrage support. Performance optimizations and new tag plugins. {% endtimeline %} ``` -------------------------------- ### Embedded Bilibili Video Card Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Renders an embedded Bilibili video card, fetching metadata from the Bilibili API. Accepts BV ID or full URL. ```markdown {% bilibili BV1xx411c7mD %} ``` ```markdown {% bilibili BV1xx411c7mD 12:34 true %} ``` ```markdown {% bilibili https://www.bilibili.com/video/BV1xx411c7mD/ %} ``` -------------------------------- ### Render Colored Labels with `label` Tag Plugin Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt The `label` tag plugin renders colored inline `` labels. Supported colors include default, blue, pink, red, purple, orange, green, yellow, and cyan. ```markdown This feature is {% label new blue %} and this one is {% label deprecated red %}. Status: {% label stable green %} — last tested {% label 2024-07 orange %}. ``` -------------------------------- ### Render Rich Link Cards with `link` Tag Plugin Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt The `link` tag plugin generates rich link cards including favicon, title, and site name. It automatically handles internal and external URLs, applying appropriate `rel` attributes. ```markdown {% link Title of the Article, Site Name, https://example.com/article %} {% link My About Page, This Blog, /about/ %} {% link Hexo Docs, Hexo, https://hexo.io/, https://hexo.io/favicon.ico %} ``` -------------------------------- ### Styled Checkbox and Radio Inputs Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Renders styled checkbox or radio inputs with optional pre-checked state and color classes. Use within Markdown. ```markdown {% checkbox Todo item one %} ``` ```markdown {% checkbox checked, Completed item %} ``` ```markdown {% checkbox blue checked, A blue checked item %} ``` ```markdown {% radio Option A %} ``` ```markdown {% radio checked, Default selected option %} ``` -------------------------------- ### Related Posts Helper in Pug Source: https://context7.com/anzhiyu-c/hexo-theme-anzhiyu/llms.txt Generates a related-posts section based on shared tags, weighted by matching tags. Used inside Pug templates. ```javascript // Usage inside a Pug template (layout/includes/post/...) // The helper is called with the current post and the full post collection. // In Pug: // != related_posts(page, site.posts) // _config.anzhiyu.yml controls the output: related_post: enable: true limit: 6 # Max number of related posts shown date_type: created # or "updated" — which date to display under each post ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.