Configuration Reference
This page documents every configuration option available in _config.modernduang.yml. Each section corresponds to a top-level key in the config file.
favicon
The site favicon path.
favicon: /img/favicon.ico
Navigation menu configuration. Each key is the menu label and the value is either a URL string or an object with extended options.
menu:
首页: /
归档: /archives
标签: /tags
分类: /categories
友链: /links
GitHub:
url: https://github.com/yourname
external: true
A key-value pair where the value is a URL string. Uses the built-in icon matching the key name.
An object with additional options:
menu:
GitHub:
url: https://github.com/yourname
icon: '<svg viewBox="0 0 24 24">...</svg>' # Custom SVG icon (optional)
external: true # Open in new tab (optional)
A menu item with nested children:
menu:
项目:
icon: '<svg>...</svg>' # Optional parent icon
children:
项目A: /project-a
项目B:
url: https://external.com
external: true
Built-in Icons
The following menu names have built-in SVG icons: 首页, 归档, 标签, 分类, 友链, 开往, 关于.
For custom menu names, provide your own SVG via the icon property.
dark_mode
Dark mode configuration.
dark_mode:
enable: true
default: light
font
Google Fonts integration.
font:
enable: true
host: https://fonts.googleapis.com
global:
external: true
families:
- Fredoka:wght@400;500;600;700
- Nunito:wght@300;400;500;600
- JetBrains+Mono:wght@400;500
Comment system configuration. Currently only supports Twikoo.
comments:
enable: false
twikoo:
envId: https://your-twikoo-envid
region: ap-shanghai
Tip: Set comment: false in a post's frontmatter to disable comments on that specific post.
Footer configuration.
footer:
since: 2024
author: YourName
powered: true
social:
travelling: true
github: true
email: false
custom: []
custom: ''
beian:
icp: ''
moe: ''
chabei: ''
Each custom social item:
social:
custom:
- name: RSS
url: /atom.xml
icon: rss # Built-in icon name or SVG string
color: '#FF6600' # Optional hover background color
footer:
custom: '<p>Your custom HTML content</p>'
ICP Beian (Record Filing)
footer:
beian:
icp: "京ICP备12345678号" # Full MIIT beian number
moe: "123456" # Moe beian number (digits only)
chabei: "123456" # Chabei beian number (digits only)
siteInfo
Site information displayed on the friend links page.
siteInfo:
url: https://yourblog.com
avatar: https://yourblog.com/avatar.png
atom: https://yourblog.com/atom.xml
The site name and description are automatically inherited from Hexo's main _config.yml.
hero
Homepage hero section configuration.
hero:
mode: fixed
text: 欢迎来到我的博客
texts:
- 欢迎来到我的博客
- 用文字记录思考,用代码改变世界
Fixed mode: Always displays the value of text.
Random mode: Picks a random string from the texts array on each page load.
plans
Annual plans / goals displayed on the homepage.
plans:
- text: 完成自定义博客主题的开发
done: true
current: 1
final: 1
- text: 至少撰写10篇博客
done: false
current: 7
final: 10
The homepage will display an overall progress bar and individual plan items. When done: true, the item shows a checkmark. When final > 1, a progress tag (current/final) is shown.
profile
Profile card displayed on the homepage.
profile:
avatar: https://your-avatar-url.png
motto: Enjoy the moment
social:
- name: GitHub
url: https://github.com/yourname
icon: github
- name: Bilibili
url: https://space.bilibili.com/12345
icon: bilibili
Social Link Items
See the Social Icons page for the full list of built-in icon names.
friendGroups
Friend link categories/groups for the links page.
friendGroups:
技术伙伴: 🌟
生活: 🎨
朋友们: 🤝
Each key is the group name and the value is an emoji icon.
Tags page configuration.
tags:
icon: '' # Custom SVG icon for the tags page header
categories
Category page configuration. Define custom styling for specific categories.
categories:
技术:
desc: 探索前沿技术
icon: '<svg viewBox="0 0 24 24">...</svg>'
color: 'var(--pastel-blue)'
textColor: '#3A7CA5'
Unmatched categories will use default styling with auto-rotating colors.
friends
Friend links list.
friends:
- name: 示例博客
url: https://example.com
desc: 一个很棒的博客
avatar: https://example.com/avatar.png
group: 技术伙伴
siteStats
Site statistics displayed on the homepage.
siteStats:
enable: false
startDate: '2024-01-01'
The homepage shows:
- Uptime — years and days since
startDate
- Ten-Year Countdown — automatically computed as
startDate + 10 years, showing remaining percentage
Full Example Configuration
Here's a complete example showing all options:
favicon: /img/favicon.ico
menu:
首页: /
归档: /archives
标签: /tags
分类: /categories
友链: /links
开往:
url: https://www.travellings.cn/go.html
external: true
关于: /about
dark_mode:
enable: true
default: light
font:
enable: true
host: https://fonts.googleapis.com
global:
external: true
families:
- Fredoka:wght@400;500;600;700
- Nunito:wght@300;400;500;600
- JetBrains+Mono:wght@400;500
comments:
enable: false
twikoo:
envId: ''
region: ap-shanghai
footer:
since: 2024
author: ''
powered: true
social:
travelling: true
github: true
email: false
custom: []
custom: ''
beian:
icp: ''
moe: ''
chabei: ''
siteInfo:
url: ''
avatar: ''
atom: ''
hero:
mode: fixed
text: 欢迎来到我的博客
texts:
- 欢迎来到我的博客
- 用文字记录思考
plans: []
profile:
avatar: ''
motto: ''
social: []
friendGroups:
朋友们: 👋
tags:
icon: ''
categories: {}
friends: []
siteStats:
enable: false
startDate: '2024-01-01'