- Project Motivation: Blog Theme Sharing Initiative (Draft)
- Design Inspired By: https://www.yinwang.org
- Theme Demo: https://en.smallyu.net
-
Multi-language Support
- Modify the
language
field in the blog project's_config.yml
file. - Available options:
en
,zh-cn
.
- Modify the
-
Custom Page Types
- The
type: tags
field marks a page as a tag page. - Supported types:
tags
,categories
,about
,display
,micro-blog
. - These are specific to this theme and not documented in Hexo’s official documentation.
- The
-
Theme Configuration
- Icons should be placed in the blog project’s
source
folder (not the theme’ssource
). - Example: Place
favicon.svg
directly intosource/
. - Configurable styles include post titles, tag displays, etc.
- Icons should be placed in the blog project’s
-
Support & Contributions
- For any issues or feature requests, use the issue tracker or submit a PR.
- Navigate to the Blog Project Directory
- If the blog project already exists, move into its directory.
- If not, initialize a new blog project:
hexo init blog
cd blog
npm i
-
Copy the Theme
- Place the theme into the
themes
directory.
- Place the theme into the
-
Install Required Dependencies
npm i --save hexo-renderer-pug
npm i --save hexo-wordcount-sy
-
Update Blog Configuration (
_config.yml
)- Set
theme: hexo-theme-yinwang
. - Disable default highlighting:
highlight -> enable: false
. - Customize
subtitle
for the blog’s title.
- Set
-
Update Theme Configuration (
_config.yml
)- No required modifications, but ensure it doesn't conflict with project settings.
-
Start the Preview Server
hexo clean && hexo server
- Specify the
issue_years
, GitHub username, repository name, and issue number in the theme configuration.
Run:
hexo new page micro-blog
Modify source/micro-blog/index.md
:
---
title: micro-blog
date: 2023-07-26 11:03:03
type: micro-blog
---
- Change the
title
if needed.
- If
issue_years
is set in_config.yml
, runninghexo generate
will automatically fetch content. - If
issue_years
is empty, manually update with:
hexo generate 2025
Run:
hexo new page tags
Modify source/tags/index.md
:
---
title: Tags Cloud
date: 2022-08-30 18:07:20
type: tags
---
- Change
title
as needed.
Due to the complexity of installation, a pre-configured template is available:
Template Repository: hexo-theme-yinwang-demo
Features Included:
- LaTeX rendering
- Micro-blog page
- Tag cloud page
- Categories page
- About page
- External links
# Navigation Menu
menu:
Blog: ''
Micro-blog: micro-blog
Tag Cloud: tags
About: about
# Pagination
paginator: false
# Header Settings
header:
blank: false # Open links in a new tab
# Article List
list:
date: true # Show post dates
wordcount: true # Show word count
# Footer
footer:
display: false
href: ""
text: "© domain name"
# Post Settings
post:
title_h1: true
blank: false
backHome: false
backhome_right: false
backHome_hr: false
backHome_prefix: "↶ "
backHome_content: "Back to Home"
backHome_suffix: ""
show_tags: true
# Tag Cloud
tags:
all: true
# Micro-blog
github:
owner: smallyunet
repo: hexo-blog
micro_blogs:
- year: 2020
issue: 7
- year: 2021
issue: 10
- year: 2022
issue: 19
- year: 2023
issue: 29
issue_years: []
# Google Analytics
google_analysis:
enable: true
id: G-XXXXXXXXXXX
Use this Hexo plugin for LaTeX support:
No additional theme-level support required.