Minimalistic but powerful Hexo theme
- 📦 Out of the box - Almost zero configuration.
- 🎨 Automatically switched light and dark theme.
- 💻 Auto fit Mobile and Screen responsively.
- Step 1: pull the repo from GitHub
cd your-blog/themes
git clone git@github.com:chen-yingfa/hexo-theme-fengye.git fengye
- Step 2: Modify
theme
setting in_config.yml
tofengye
.
_config.yml
- theme: some-theme
+ theme: fengye
Be default, I have included links to the following pages in the header bar, which are specified in the _config.yml
file (the nav
list).
- Posts
- Publications
- About
- Categories
- Tags
- Home
However, they don't work out of the box. You need to call hexo new page <page_path>
to create a page for them (e.g., execute hexo new page categories
to create the categories page). If you don't want any of them, remove the entries from the config.
I think you can just create the files manually (e.g.,
source/categories/index.md
) instead of usinghexo new page
, but I'm not sure.
After changing the config and set of pages, make sure the run
hexo clean
andhexo g
to re-generate the site (because Hexo will cache something that causes the changes to not take effect).
For the categories and tags pages, you also have to respectively set layout: categories
and layout: tags
for them to work.
The categories and tags are automatically generated by Hexo. Just add categories
and tags
(both are a string or a list of strings) in the frontmatter of your posts. For instance:
---
author:
title:
categories: Paper
tags:
- paper
- arxiv
Run hexo new page about
and hexo new page publications
to create the about and publications page, respectively. You can also use custom paths for these pages, but you need to modify the nav
list in the _config.yml
file accordingly. Then just write the content of these two pages in Markdown in _posts/about/index.md
and _posts/publications/index.md
, respectively.
The options to specify in the _config.yml
file include:
portrait
: The path to the image in the center of the home page.description
,title
,subtitle
: These three default config entries will be shown in the home page below the portrait image.my_location
andcv_path
: These will be shown between the subtitle and description.
By default, this theme will show a list of featured posts in the home page below the description of the author. Featured posts are identified as posts with a featured: true
entry in the frontmatter. To disable this, set show_featured_posts: false
in the config file.
Currently, the footer can only be modified by directly modifying the fengye/layout/_partial/footer.ejs
source file, but I guess there is not much to change here.
A large part of the code and README is mostly based on the Maple theme by xbmlz.