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.
npx -y skills add PlayWithAndyJin/modernduang-skills --skill modernduang-theme-setupAssembled 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.ymlornode_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:
| Page | File | Replace with |
|---|---|---|
| Tags | source/tags/index.md | layout: tags |
| Categories | source/categories/index.md | layout: categories |
| About | source/about/index.md | layout: about |
| Links | source/links/index.md | layout: links |
| Search | source/search/index.md | layout: 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
| Page | File | Replace with |
|---|---|---|
| Search | source/search/index.md | layout: 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
- Check
comments.enable: truein config - Check
theme.comments.twikoo.envIdis set - Self-hosted Twikoo (Vercel etc.) must NOT have
regionparameter - Run
hexo clean && hexo g && hexo safter config changes
Font Not Working
- Check
font.enable: true - Ensure CSS var
--font-display/--font-bodymatch the font family names loaded from Google Fonts - 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
- Verify
theme: modernduangin Hexo root_config.yml - Check theme is installed:
ls node_modules/hexo-theme-modernduangorls themes/modernduang
Workflow
When a user asks for help with Modern Duang theme:
- Check environment first — Run
hexo versionandnode -v. If Node < 14 or Hexo < 6, adjust the installation approach accordingly. - Understand what they want — install, configure, customize, or debug
- Choose the right installation path — Hexo >= 6 uses
node_modules/directly; Hexo < 6 requirescp -r node_modules/hexo-theme-modernduang themes/modernduang - Read the relevant files — check their current
_config.modernduang.ymlor theme config - Make changes — edit config files, modify templates only if necessary
- Remind to rebuild — always tell them:
hexo clean && hexo g && hexo s - Verify — offer to check the result if they're running locally