agentsclimarketplace

Modernduang theme setup

Skill PlayWithAndyJin/modernduang-skills/skills/modernduang-theme-setup

帮助用户快速配置Hexo的一个主题Modern Duang,同时帮助用户排查部署可能遇到问题。也可以帮助用户自定义主题。| Help users quickly configure Modern Duang, a topic of Hexo, and help users troubleshoot possible deployment problems. It can also help users customize themes.

Install
npx -y skills add PlayWithAndyJin/modernduang-skills --skill modernduang-theme-setup

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Help users install, configure, and customize the Modern Duang Hexo theme. Use this skill whenever the user mentions Modern Duang, modernduang, Hexo theme installation, theme configuration, Twikoo comments setup, friend links, ICP beian, font customization, dark mode, or any Hexo theme-related troubleshooting.

SKILL.md

6.5 KB, as published. Nobody here has run it

Modern Duang Theme Skill

Help users set up and customize the Modern Duang Hexo blog theme.

Reference Files

For detailed configuration options, read the theme's _config.yml:

themes/modernduang/_config.yml

For the full README documentation:

themes/modernduang/README.md        (Chinese)
themes/modernduang/README_en.md     (English)

Key Facts

Environment Check

ALWAYS check the environment first before any installation or configuration.

hexo version   # Check Hexo version
node -v        # Check Node.js version
  • Node.js >= 14.0.0: Required. If lower, tell the user to upgrade.
  • Hexo >= 6.0.0: Theme can load directly from node_modules/.
  • Hexo < 6.0.0: Theme must be copied to themes/ directory (see below).

Installation

For Hexo >= 6.x (recommended):

npm install hexo-theme-modernduang --save

Then set in Hexo root _config.yml:

theme: modernduang

Copy config:

cp node_modules/hexo-theme-modernduang/_config.yml _config.modernduang.yml

For Hexo < 6.x (manual copy required):

npm install hexo-theme-modernduang --save
cp -r node_modules/hexo-theme-modernduang themes/modernduang

Then set in Hexo root _config.yml:

theme: modernduang

Copy config:

cp themes/modernduang/_config.yml _config.modernduang.yml

Configuration

  • All theme settings go in _config.modernduang.yml (site root)
  • Default config is at themes/modernduang/_config.yml or node_modules/hexo-theme-modernduang/_config.yml

Common Customizations

Profile & Avatar:

profile:
  avatar: https://your-avatar-url.png
  motto: Your motto
  social:
    - name: GitHub
      url: https://github.com/yourname
      icon: github

Font (default: Fredoka/Nunito/JetBrains Mono):

font:
  enable: true
  host: https://fonts.googleapis.com
  global:
    external: true
    families:
      - Fredoka:wght@400;500;600;700
      - Nunito:wght@300;400;500;600;700
      - JetBrains+Mono:wght@400;500

Dark Mode:

dark_mode:
  enable: true
  default: light  # or 'dark'

Twikoo Comments (self-hosted, remove region if using Vercel/Docker):

comments:
  enable: true
  twikoo:
    envId: https://your-twikoo-envid
    # region: ap-shanghai   # 腾讯云 CloudBase 才需要,自托管请删除此行

Site Stats (disabled by default):

siteStats:
  enable: true  # 默认为 false,需手动开启
  startDate: '2024-01-01'

Friend Links with Groups:

friendGroups:
  技术: 🌟
  生活: 🎨

friends:
  - name: Example Blog
    url: https://example.com
    desc: A great blog
    avatar: https://example.com/avatar.png
    group: 技术

ICP Beian:

footer:
  beian:
    icp: "京ICP备12345678号"
    moe: "123456"
    chabei: "123456"

Post Visibility (hide posts):

visibility: local   # Hidden from listings, accessible via direct URL
visibility: global  # Completely hidden, returns 404

Create Required Pages:

hexo new page tags
hexo new page categories
hexo new page about
hexo new page links
hexo new page search

Then replace date: with layout: in each page's frontmatter:

PageFileReplace with
Tagssource/tags/index.mdlayout: tags
Categoriessource/categories/index.mdlayout: categories
Aboutsource/about/index.mdlayout: about
Linkssource/links/index.mdlayout: links
Searchsource/search/index.mdlayout: search

Article Search:

npm install hexo-generator-searchdb --save
hexo new page search

Set source/search/index.md frontmatter to layout: search.

Add to Hexo root _config.yml:

search:
  path: search.xml
  field: post
  content: true
PageFileReplace with
Searchsource/search/index.mdlayout: search

RSS Feed:

npm install hexo-generator-feed --save

Add to Hexo _config.yml:

feed:
  type: atom
  path: atom.xml
  limit: 20
  content: true

Built-in Social Icon Names: github, bilibili, email, blog, tiktok, kuaishou, xiaohongshu, wechat, qq, gitee, rss, gitcode

Custom Blockquotes

{%note%}Tip content{%endnote%}
{%warning%}Warning content{%endwarning%}
{%declare%}Declaration content{%enddeclare%}
{%danger%}Danger content{%enddanger%}

Troubleshooting

Comments Not Showing

  1. Check comments.enable: true in config
  2. Check theme.comments.twikoo.envId is set
  3. Self-hosted Twikoo (Vercel etc.) must NOT have region parameter
  4. Run hexo clean && hexo g && hexo s after config changes

Font Not Working

  1. Check font.enable: true
  2. Ensure CSS var --font-display/--font-body match the font family names loaded from Google Fonts
  3. Run hexo clean && hexo g && hexo s

Navigation Home Link Always Active

  • Fixed in v1.1.0+. Upgrade: npm update hexo-theme-modernduang

Theme Not Loading

  1. Verify theme: modernduang in Hexo root _config.yml
  2. Check theme is installed: ls node_modules/hexo-theme-modernduang or ls themes/modernduang

Workflow

When a user asks for help with Modern Duang theme:

  1. Check environment first — Run hexo version and node -v. If Node < 14 or Hexo < 6, adjust the installation approach accordingly.
  2. Understand what they want — install, configure, customize, or debug
  3. Choose the right installation path — Hexo >= 6 uses node_modules/ directly; Hexo < 6 requires cp -r node_modules/hexo-theme-modernduang themes/modernduang
  4. Read the relevant files — check their current _config.modernduang.yml or theme config
  5. Make changes — edit config files, modify templates only if necessary
  6. Remind to rebuild — always tell them: hexo clean && hexo g && hexo s
  7. Verify — offer to check the result if they're running locally

Resources

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.