Loading...

Loading...

Sidebar Widgets

This page explains sidebar & homepage widgets: page-level statistics widgets (tag cloud/word cloud/category radar/archive/charts), the Live2D mascot, and the music player. The first two are auto-rendered by the theme; the latter two have dedicated config.

The authoritative source of the theme config is userConfig/_config.tmp.yml (it overwrites the theme config at CI time).

How to read: every section follows “How to enable → Common options → All tunable keys → Boundaries & conflicts”. Look at the effect first, then the corresponding config that produces it — copy and use.

1. Page-level Widgets (auto-rendered)

Purpose: the following widgets are rendered automatically by the theme generators per page — no config needed, they update with the content.

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

1.1 How to enable

Effect: open /tags/ and you see a chip-style tag list plus a canvas word cloud (font size ∝ post count); open /categories/ and you see a category cloud plus a radar chart; open /archives/ and you see a timeline and a calendar. No config change is needed — create content and they appear.

Corresponding config: none (the widgets are mounted by the layout templates).

themes/matery/layout/_partial/widget/

1.2 Common options

① Adjust the tag cloud content

Effect: the words and font-size distribution of the tag list and word cloud follow the post tags; add a tag and the word cloud gains an entry.

Corresponding config (post front-matter):

tags:
  - Hexo
  - 教程

② Adjust the category radar

Effect: the radar axes and values follow categories; the deeper the category hierarchy, the finer the distribution.

Corresponding config (post front-matter):

categories:
  - 教程
  - Hexo

1.3 All tunable keys

Widget list (corresponding to the themes/matery/layout/_partial/widget/ directory):

PageWidgetDescription
/tags/tag cloud tag-cloud + word cloud tag-wordcloudchip-style tag list; canvas word cloud with font size ∝ post count
/categories/category cloud category-cloud + radar category-radarcanvas radar showing post count distribution per category
/archives/timeline + calendar post-calendaryear/month timeline, dots + collapsible years
/about/site statistics charts post-chartsmultiple canvas charts (posts/categories/tags/timeline etc.)
Post pagescategory bar category-barposts under the current category (config in the Post Page Configuration chapter)

1.4 Boundaries & conflicts

  • These widgets are mounted on their layouts; page data comes from the site content itself.
  • To “configure” them you essentially adjust the content structure (tag naming, category hierarchy), or edit the themes/matery/layout/_partial/widget/*.ejs templates (advanced customization).
  • With no posts the word cloud/radar shows an empty figure — that is not a config error.

1.5 Summary

  • Minimum: configure nothing, just publish posts
  • Change the distribution: tune tag/category naming and hierarchy
  • Change the style: edit _partial/widget/*.ejs
  • Empty figure: first confirm there are published posts

2. Live2D Mascot (live2dWidget)

Purpose: the Live2D mascot in the bottom-right/bottom-left corner (pure static models, no PHP backend), with interactive tips.

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

2.1 How to enable

Effect: a Live2D model that breathes and follows the mouse appears in the page corner; clicking/hovering pops up a tip bubble.

Corresponding config (theme config):

live2dWidget:
  enable: true   # master switch

2.2 Common options

① Model and tips

Effect: switch to another character model, or change the tip text shown in the bubble.

Corresponding config (resource paths, not theme config):

source/live2d/model_list.json     # model list
source/live2d/model/              # local models
themes/matery/source/libs/live2d/waifu-tips.json   # tips

② Autoload script path

Effect: the mascot is created only after the page loads autoload.js; a wrong path means it never appears.

Corresponding config:

libs:
  js:
    live2dAutoload: /libs/live2d/autoload.js

③ Menu positioning selector

Effect: classes such as menu-2d-home on menu items decide where the mascot’s tip box appears.

Corresponding config (menu config):

menu:
  home:
    class: menu-2d-home

2.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
live2dWidget.enablebooltruetrue / falsemascot master switch
libs.js.live2dAutoloadstring/libs/live2d/autoload.jsscript pathautoload entry
source/live2d/model_list.jsonfile—model listswitchable models
source/live2d/model/dir—model fileslocal model assets
waifu-tips.jsonfile—tips JSONbubble copy
menu item class: menu-2d-*string—menu-2d-*tip box positioning selector

2.4 Boundaries & conflicts

  • Models and tips are configured under source/live2d/ (static models) and the waifu-tips files, managed independently of the theme config.
  • The class: menu-2d-* values in menu items (e.g. menu-2d-home) are positioning selectors for the mascot’s tip box (see the Navigation Menu & Homepage chapter).
  • Full add/remove/switch procedures for models: see the blog’s live2d maintenance docs.
  • Dual runtime: Cubism 2 (live2d.min.js) and Cubism 5 (live2dcubismcore.min.js) coexist; autoload.js loads the appropriate version based on model metadata (cubism2Path / cubism5Path).
  • Local models: models and manifests are located at source/live2d/model/ and source/live2d/model_list.json.
  • Actual config keys: theme config has only the live2dWidget.enable switch; the autoload script path is libs.js.live2dAutoload → /libs/live2d/autoload.js; runtime assets (autoload.js / waifu-tips.js / waifu.css) live in themes/matery/source/libs/live2d/.
  • Tips are configurable: yes — autoload.js points to waifu-tips.json via waifuPath; edit that file to customize tips.
  • Dark mode adaptation: waifu.css supports both manual dark mode ([data-user-color-scheme="dark"]) and system preference (prefers-color-scheme: dark).
  • Loading threshold: layout/_partial/script/live2d.ejs only loads when window width > BP.fun AND visit count > 2.

2.5 Summary

  • Minimum: live2dWidget.enable: true
  • Change the character: edit model_list.json + model/
  • Change the lines: edit waifu-tips.json
  • Not showing: check the window-width and visit-count thresholds first

3. Music Player (music / musics)

Purpose: an APlayer + Meting based music player supporting NetEase/QQ Music playlists. Two places:

  • music: homepage (non-fixed mode, can auto-hide)
  • musics: standalone music page /musics/ (fixed mode, floats site-wide)

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

3.1 How to enable

Effect: a music card appears on the homepage (title “听听音乐” + play button + playlist), auto-hiding on scroll; open /musics/ and a player bar floats at the bottom of the page and keeps playing across page changes.

Corresponding config (theme config, homepage):

music:
  enable: true
  title:
    enable: true
    show: 听听音乐
  server: netease
  type: playlist
  id: 4965675848

Corresponding config (theme config, standalone music page):

musics:
  enable: true
  server: netease
  type: playlist
  id: 4965675848

3.2 Common options

① Choose platform and content type

Effect: server + type + id together decide what plays. For example netease + playlist + 4965675848 plays that NetEase playlist; tencent + song + a song ID plays a single track.

Corresponding config:

music:
  server: netease
  type: playlist
  id: 4965675848

② Fixed mode (musics only)

Effect: with fixed: true the player floats at the bottom of the viewport and stays while scrolling; false scrolls with the page.

Corresponding config:

musics:
  fixed: true

③ Autoplay

Effect: with true, entering the page attempts to play immediately (subject to browser autoplay policies).

Corresponding config:

musics:
  autoplay: true

④ Theme color

Effect: the player buttons and progress bar turn the specified color.

Corresponding config:

musics:
  theme: '#42b983'

⑤ Loop and order

Effect: loop controls single-track/list/no looping; order controls sequential or random playback.

Corresponding config:

musics:
  loop: 'all'
  order: 'random'

⑥ Preload and volume

Effect: preload decides whether audio is prefetched on page load; volume is the initial volume (void once the user adjusts it manually).

Corresponding config:

musics:
  preload: 'auto'
  volume: 0.7

⑦ List display

Effect: with listFolded: true the playlist starts collapsed; listMaxHeight caps the expanded list height and scrolls beyond it.

Corresponding config:

musics:
  listFolded: true
  listMaxHeight: "525px"

⑧ Homepage auto-hide / hide lyrics

Effect: with autoHide: true the homepage player collapses on scrolling down; with hideLrc: true lyrics are not shown.

Corresponding config:

music:
  autoHide: true
  hideLrc: true

3.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
music.enableboolfalsetrue / falsehomepage music switch
music.title.enablebooltruetrue / falsetitle bar (non-fixed mode only)
music.title.showstring听听音乐any stringtitle text
music.autoHidebooltruetrue / falseauto hide
music.serverstringneteasenetease / tencent / kugou / xiami / baidumusic platform
music.typestringplaylistsong / playlist / album / search / artistcontent type
music.idnumber/string—playlist/song/album ID or search keywordplayback target
music.fixedbooltrue (template value)true / falsefixed mode
music.autoplayboolfalsetrue / falseautoplay
music.themestring'#42b983'color valueplayer theme color
music.loopstring'all''all' / 'one' / 'none'loop mode
music.orderstring'random''list' / 'random'playback order
music.preloadstring'auto''none' / 'metadata' / 'auto'preload strategy
music.volumenumber0.70–1default volume
music.listFoldedbooltrue (template value)true / falselist folded by default
music.hideLrcbooltrue (template value)true / falsehide lyrics
musics.enablebooltruetrue / falsestandalone music page switch
musics.title.enablebooltruetrue / falsetitle bar
musics.title.showstring听听音乐any stringtitle text
musics.serverstringneteasesame as music.servermusic platform
musics.typestringplaylistsame as music.typecontent type
musics.idnumber/string—playlist/song/album ID or search keywordplayback target
musics.fixedboolfalsetrue / falsefixed mode
musics.autoplaybooltruetrue / falseautoplay
musics.themestring'#42b983'color valuetheme color
musics.loopstring'all''all' / 'one' / 'none'loop mode
musics.orderstring'random''list' / 'random'playback order
musics.preloadstring'auto''none' / 'metadata' / 'auto'preload strategy
musics.volumenumber0.70–1default volume
musics.listFoldedboolfalsetrue / falselist folded by default
musics.listMaxHeightstring"525px"CSS length with unitmax list height

3.4 Boundaries & conflicts

  • Fill id with the platform’s playlist/song ID (NetEase playlist IDs are visible in the page URL).
  • The player remembers user settings — after a user adjusts volume manually, the volume default no longer applies.
  • Homepage music and music page musics are two separate configs and do not inherit from each other; changing one does not affect the other.
  • title only works in non-fixed mode (a fixed bar has no title bar).

3.5 Summary

  • Minimum: enable + server + type + id
  • Site-wide background music: musics.fixed: true
  • Don’t want it to play automatically: autoplay: false
  • Volume has no effect: the user adjusted it manually — expected behavior

4. Other Homepage Widgets

Purpose: the remaining movable widgets for the homepage and about page (dream quote, video, recommendations, gallery/projects/skills, short posts, ads).

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

4.1 How to enable

Effect: the homepage shows a “dream quote” card, a video block and a recommended-posts slot in order; the about page shows gallery/projects/skills cards; the sidebar shows short posts and ads.

Corresponding config: each widget has its own config block — see 4.2 and 4.3.

4.2 Common options

① Dream quote

Effect: a quote appears on the homepage, optionally with a title.

Corresponding config (theme config):

dream:
  enable: true
  showTitle: false
  title: 追梦
  text: "凡我所失,皆非我所有……"

② Homepage video

Effect: a video player appears on the homepage (url or iframeUrl, choose one).

Corresponding config (theme config):

video:
  enable: true
  url: https://example.com/video.mp4

③ Recommended posts

Effect: a recommendation slot appears on the homepage showing the specified posts.

Corresponding config (theme config):

recommend:
  enable: true
  showTitle: true
  useConfig: false

④ About page gallery/projects/skills

Effect: /about/ shows an image wall, a project grid and skill progress bars.

Corresponding config (theme config):

myGallery:
  enable: true
myProjects:
  enable: true
mySkills:
  enable: true

⑤ Short posts (Artitalk)

Effect: the /bb/ page shows a list of short updates (currently disabled).

Corresponding config (theme config):

artitalk:
  enable: false

⑥ Ad cards

Effect: ad cards appear in the sidebar.

Corresponding config (theme config):

post:
  advertisements:
    - id: "ad-1"
      text: "广告文案"
      enable: true

4.3 All tunable keys

themes/matery/layout/_partial/widget/ also contains the following mountable widgets; see the corresponding layout templates for enabling:

WidgetDescription
dreamhomepage “dream” quote (config in the Navigation Menu & Homepage chapter)
videohomepage video (theme video section, enable: false by default)
recommendrecommended posts (theme recommend section + _data/recommends.json)
my-gallery / my-projects / my-skillsabout page gallery/projects/skills display
artitalkshort posts (Artitalk service, not enabled)
advertisementad cards (post.advertisements, see the Post Page Configuration chapter)
KeyTypeDefaultAllowed values / rangeWhat it does
—————
dream.enablebooltruetrue / falsedream quote switch
dream.showTitleboolfalsetrue / falsewhether to show the title
dream.titlestring追梦any stringtitle text
dream.textstring—any stringquote body
video.enableboolfalsetrue / falsehomepage video switch
video.url / video.iframeUrlstring—video URL (one of the two is required)video source
video.autoplayboolfalsetrue / falseautoplay
video.loopboolfalsetrue / falseloop
video.volumenumber0.70–1default volume
recommend.enablebooltruetrue / falserecommendation slot switch
recommend.showTitlebooltruetrue / falseshow title
recommend.useConfigboolfalsetrue / falseuse _data/recommends.json
artitalk.enableboolfalsetrue / falseshort posts switch
post.advertisements[].enablebooltruetrue / falseper-ad switch

4.4 Boundaries & conflicts

  • Each widget renders only on its own layout: homepage widgets never appear on post pages, and about page widgets never appear on the homepage.
  • For video, fill in at least one of url and iframeUrl, otherwise the player has no content.
  • The three about page widgets (§6–§8) each have an independent enable — don’t enable just one and expect all three to appear.

4.5 Summary

  • Minimum: enable only the widget you need
  • Homepage too full: turn off video or recommend
  • About page empty: check enable and data of myProjects / mySkills / myGallery

5. About Page Profile (profile)

Purpose: personal info card at the top of /about/ — avatar, career, personal introduction.

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

5.1 How to enable

Effect: a round avatar appears at the top-left of the about page, with career tags and a multi-line personal introduction on the right.

Corresponding config (theme config):

profile:
  avatar: /medias_webp/avatar.webp
  career: IIoT | TI方案 | 安防
  introduction: 嵌入式领域专家:
  introDetail:
    - 做遍安防前端、后端所有产品线……

5.2 Common options

① Change the avatar

Effect: the avatar at the top of the about page is replaced with the specified image (square recommended, cropped to a circle).

Corresponding config:

profile:
  avatar: /medias_webp/my-avatar.webp

② Career tags

Effect: each segment separated by | renders as an independent tag.

Corresponding config:

profile:
  career: Linux | Docker | 嵌入式

③ Multi-line introduction

Effect: each list item renders as one line, in list order.

Corresponding config:

profile:
  introDetail:
    - 第一行介绍
    - 第二行介绍

5.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
profile.avatarstring—image path or URLavatar
profile.careerstring—pipe-separated tagscareer tags
profile.introductionstring—any stringintro lead-in
profile.introDetailarray—list of stringsline-by-line introduction

5.4 Boundaries & conflicts

  • introDetail is a list, one line of introduction per item; career separates multiple career tags with |.
  • Put the avatar under source/ and reference it with an absolute path; external images need a full URL.

5.5 Summary

  • Minimum: avatar + introduction
  • Multiple tags: separate career entries with |
  • Multi-line intro: add list items to introDetail

6. About Page Projects (myProjects)

Purpose: “My Projects” card grid on /about/.

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

6.1 How to enable

Effect: a project card grid appears on the about page; each card has an icon, icon background, project name and description, and links out when clicked.

Corresponding config (theme config):

myProjects:
  enable: true
  data:
    LinuxPTTools:
      icon: fab fa-linux
      iconBackground: 'linear-gradient(to bottom right, #66BB6A 0%, #81C784 100%)'
      url: https://github.com/appotry/PTtool
      desc: 为PT用户设计,方便同时刮削和做种。

6.2 Common options

① Add a project

Effect: one more card appears in the grid; the key name is the project name.

Corresponding config:

myProjects:
  data:
    MyTool:
      icon: fab fa-github
      url: https://github.com/you/my-tool
      desc: 一句话描述

② Change icon and background

Effect: the card icon becomes the specified Font Awesome icon and the icon background becomes the specified gradient/solid color.

Corresponding config:

myProjects:
  data:
    MyTool:
      icon: fas fa-tools
      iconBackground: 'linear-gradient(to bottom right, #29B6F6 0%, #1E88E5 100%)'

③ Turn the whole block off

Effect: the project grid no longer appears on the about page.

Corresponding config:

myProjects:
  enable: false

6.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
myProjects.enablebooltruetrue / falseproject block switch
myProjects.dataobject—key = project nameproject collection
myProjects.data.<name>.iconstring—Font Awesome class, e.g. fab fa-linuxicon
myProjects.data.<name>.iconBackgroundstring—CSS gradient/coloricon background
myProjects.data.<name>.urlstring—link URLproject link
myProjects.data.<name>.descstring—any stringproject description

6.4 Boundaries & conflicts

  • Each key under data is a project (the key name is the project name; : groups like Docker:hexo are allowed).
  • Set enable to false or delete the block when you don’t need it.
  • icon must be a class already loaded by Font Awesome — a typo leaves the icon blank.

6.5 Summary

  • Minimum: enable: true + one project
  • Add projects: add keys under data
  • Change the icon: icon + iconBackground
  • Drop the whole block: enable: false

7. About Page Skills (mySkills)

Purpose: “My Skills” progress bar list on /about/.

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

7.1 How to enable

Effect: several skill names with colored progress bars appear on the about page; the bar length equals percent.

Corresponding config (theme config):

mySkills:
  enable: true
  data:
    C语言:
      background: 'linear-gradient(to right, #2196F3 0%, #42A5F5 100%)'
      percent: 90%

7.2 Common options

① Add a skill

Effect: one more skill row appears; the key name is the skill name.

Corresponding config:

mySkills:
  data:
    Python:
      background: 'linear-gradient(to right, #FF0066 0%, #FF00CC 100%)'
      percent: 80%

② Adjust proficiency

Effect: the bar length changes with the percentage; the larger percent, the longer the bar.

Corresponding config:

mySkills:
  data:
    Python:
      percent: 60%

7.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
mySkills.enablebooltruetrue / falseskill block switch
mySkills.dataobject—key = skill nameskill collection
mySkills.data.<name>.backgroundstring—CSS gradient/colorprogress bar color
mySkills.data.<name>.percentstring—percentage string, e.g. 90%proficiency

7.4 Boundaries & conflicts

  • Each key under data is a skill (the key name is the skill name); percent controls the bar length.
  • percent needs the % suffix; a bare number may not render (other forms unverified).

7.5 Summary

  • Minimum: enable: true + one skill
  • Add skills: add keys under data
  • Adjust length: change percent
  • Don’t forget %: 90%, not 90

Purpose: “My Gallery” image wall on /about/.

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

8.1 How to enable

Effect: an image grid appears on the about page, one image per cell at equal width; clicking opens a larger view (single image, no title or description).

Corresponding config (theme config):

myGallery:
  enable: true
  data:
    - /medias_webp/featureimages/0.webp
    - /medias_webp/featureimages/1.webp

8.2 Common options

① Add/remove images

Effect: the number of grid images matches the length of the data array, in display order.

Corresponding config:

myGallery:
  data:
    - /medias_webp/my/1.webp
    - /medias_webp/my/2.webp

② Turn the image wall off

Effect: the gallery block no longer appears on the about page.

Corresponding config:

myGallery:
  enable: false

8.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
myGallery.enablebooltruetrue / falseimage wall switch
myGallery.dataarray—array of image pathsimage list

8.4 Boundaries & conflicts

  • data is an array of image paths, one image per item; place images under source/ and reference them with absolute paths.
  • Difference from the standalone /galleries/ pages: myGallery is a simple image wall on the About page (just a data path array, no titles/descriptions); the standalone gallery pages read source/_data/galleries.yml (cover/description/lightbox, see Layout & Pages §4). The two data sources are independent and do not affect each other.

8.5 Summary

  • Minimum: enable: true + a data array
  • Want titles/descriptions: use the standalone gallery pages, not myGallery
  • Images not showing: check that the paths are under source/

9. Archive Page Calendar (postCalendar)

Purpose: whether /archives/ shows the “post calendar” widget (highlights days with posts).

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

9.1 How to enable

Effect: a month calendar appears at the top of the archive page with post dates highlighted; clicking a date jumps to the corresponding post.

Corresponding config (theme config):

postCalendar: true

9.2 Common options

① Turn the calendar off

Effect: the archive page keeps only the timeline and no longer shows the calendar.

Corresponding config:

postCalendar: false

9.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
postCalendarbooltruetrue / falsearchive page calendar switch

9.4 Boundaries & conflicts

  • Boolean switch; with true a calendar shows at the top of the archive page with post dates highlighted.
  • Affects only /archives/, not post pages or the homepage.

9.5 Summary

  • Minimum: postCalendar: true
  • Archive page too full: set false

10. Bbtime (bbtime)

Purpose: sidebar “bb” (status/updates) widget, backed by LeanCloud storage.

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

10.1 How to enable

Effect: a “bb” card appears in the sidebar listing recent short updates, expandable to a compose box.

Corresponding config (theme config):

bbtime:
  enable: true
  appId: your-app-id
  appKey: your-app-key
  serverURLs: https://your-api.example.com

10.2 Common options

① Fill in LeanCloud credentials

Effect: updates can be read and written; wrong credentials leave the card blank or erroring.

Corresponding config:

bbtime:
  appId: your-app-id
  appKey: your-app-key

② Fill in the API address

Effect: connects to your LeanCloud app node (the international edition uses a different domain).

Corresponding config:

bbtime:
  serverURLs: https://your-api.example.com

10.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
bbtime.enableboolfalsetrue / falsebb widget switch
bbtime.appIdstring—LeanCloud App IDapp identifier
bbtime.appKeystring—LeanCloud App Keyapp key
bbtime.serverURLsstring—API URLLeanCloud node

10.4 Boundaries & conflicts

  • Create an app in LeanCloud to get appId/appKey; fill serverURLs with your LeanCloud API address (international: https://first8ofappid.api.lncldglobal.com).
  • This and §12 Artitalk are two short-post solutions — do not enable both.

10.5 Summary

  • Minimum: enable + two credentials + serverURLs
  • Domestic/international: note the different serverURLs domains
  • Choose one of Artitalk and bbtime

Purpose: homepage recommendation slot — shows a curated post list, with configurable title and data source.

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

11.1 How to enable

Effect: a “Recommended posts” block appears on the homepage listing several specified posts (title + cover).

Corresponding config (theme config):

recommend:
  enable: true
  showTitle: true
  useConfig: false

11.2 Common options

① Specify posts via a config file

Effect: the recommendation slot content switches to the list in source/_data/recommends.json — change recommendations without touching the theme config.

Corresponding config (theme config):

recommend:
  useConfig: true

Data source (when useConfig: true): the theme ships no template file — create source/_data/recommends.json yourself (shape: {"recommends": [...]}):

{
  "recommends": [
    { "title": "Recommended post title", "url": "/posts/xxx/", "cover": "/medias_webp/cover/xxx.webp" }
  ]
}

② Hide the block title

Effect: the recommendation slot no longer shows the “Recommended posts” title, only the cards.

Corresponding config:

recommend:
  showTitle: false

11.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
recommend.enablebooltruetrue / falserecommendation slot switch
recommend.showTitlebooltruetrue / falseshow the block title
recommend.useConfigboolfalsetrue / falseuse _data/recommends.json
_data/recommends.jsonfile—{"recommends": [...]}recommendation data
.recommends[].titlestring—any stringcard title
.recommends[].urlstring—post linktarget URL
.recommends[].coverstring—image pathcover image

11.4 Boundaries & conflicts

  • With useConfig: false (default), recommended posts come from the theme config’s top property; with useConfig: true, edit source/_data/recommends.json without touching the theme.
  • After changing the data file you must clear the cache and rebuild (rm -f db.json && hexo generate, or tools/cicd.sh -d), otherwise stale data is read.

11.5 Summary

  • Minimum: enable: true
  • Frequent recommendation changes: useConfig: true + JSON
  • JSON not taking effect: clear db.json first

12. Artitalk (artitalk)

Purpose: dynamic “bb” (status/updates) widget — short posts like a microblog, backed by LeanCloud storage, shown on the standalone /bb/ page.

Learning path: How to enable → Common options → All tunable keys → Boundaries & conflicts

12.1 How to enable

Effect: opening /bb/ shows the short-post list and a compose box; new posts appear immediately.

Corresponding config (theme config):

artitalk:
  enable: true
  appId: your-app-id
  appKey: your-app-key

You also need to create the page (see 12.4).

12.2 Common options

① LeanCloud credentials

Effect: short posts can be read and written; wrong credentials leave the list blank.

Corresponding config:

artitalk:
  appId: your-app-id
  appKey: your-app-key

② Create the /bb/ page

Effect: the site gains a /bb/ route rendered with the Artitalk layout.

Corresponding config (page front-matter):

layout: bb

12.3 All tunable keys

KeyTypeDefaultAllowed values / rangeWhat it does
artitalk.enableboolfalsetrue / falseshort posts switch
artitalk.appIdstring—LeanCloud App IDapp identifier
artitalk.appKeystring—LeanCloud App Keyapp key
page front-matter layoutstring—bbshort-post page layout

12.4 Boundaries & conflicts

  • Currently disabled (enable: false). To enable: ① create an app in LeanCloud and a content Class (with a content column, String type); ② record appid/appKey; ③ hexo new page bb to create /bb/, set layout: bb in front-matter.
  • Docs: artitalk.js.org.

12.5 Summary

  • Minimum: enable + two credentials + the /bb/ page
  • Only the page is missing: hexo new page bb + layout: bb
  • Class not created: create content in LeanCloud first

Appendix: Sidebar Widget Quick Reference

WidgetPageConfig
Tag cloud/word cloud/tags/auto-rendered, no config
Category cloud/radar/categories/auto-rendered, no config
Archive timeline/calendar/archives/auto-rendered, no config; postCalendar controls the calendar
Site stats charts/about/auto-rendered, no config
Live2D mascotsite-widetheme live2dWidget.enable
Homepage musichomepagetheme music section
Music page player/musics/theme musics section (id/server/type/fixed etc.)
Dream quotehomepagetheme dream section
Homepage videohomepagetheme video section (off by default)
Recommended postshomepagetheme recommend section + _data/recommends.json
Profile/about/theme profile section
My projects/about/theme myProjects section
My skills/about/theme mySkills section
My gallery/about/theme myGallery section
Bbtimesidebartheme bbtime section (off by default)
Short posts/bb/theme artitalk section (off by default)

Suggested reading order: first fill the about page with profile / myProjects / mySkills / myGallery, then decide the homepage widgets (dream / video / recommend), and finally enable site-wide widgets as needed (live2dWidget / music / musics). Every widget’s enable is an independent switch — turning it off is the way to isolate a problem.

Comments
Data Loading...