Skip to content

🍁枫叶:一个简约的 Hexo 主题 // Fengye: a minimalistic Hexo theme.

License

Notifications You must be signed in to change notification settings

chen-yingfa/hexo-theme-fengye

Repository files navigation

Hexo-theme-fengye

Minimalistic but powerful Hexo theme

Demo

Table of Contents

Features

  • 📦 Out of the box - Almost zero configuration.
  • 🎨 Automatically switched light and dark theme.
  • 💻 Auto fit Mobile and Screen responsively.

Installation

  • Step 1: pull the repo from GitHub
cd your-blog/themes
git clone [email protected]:chen-yingfa/hexo-theme-fengye.git fengye
  • Step 2: Modify theme setting in _config.yml to fengye.
_config.yml
- theme: some-theme
+ theme: fengye

How to Configure Pages

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 using hexo new page, but I'm not sure.

After changing the config and set of pages, make sure the run hexo clean and hexo g to re-generate the site (because Hexo will cache something that causes the changes to not take effect).

Categories and Tags Page

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

About and Publications Page

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.

Home Page

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 and cv_path: These will be shown between the subtitle and description.

Featured Posts

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.

Footer Configuration

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.

Acknowledgments

A large part of the code and README is mostly based on the Maple theme by xbmlz.