Moments piled up.
- Simple and easy to customize
- Concentrated on reading
and writing (find a Markdown editor then)experience
- Mobile-friendly & widescreen-friendly
- Flexible commenting control
cd into your Hexo root directory.
yarn add hexo-renderer-ejs hexo-generator-archive hexo-generator-category-enhance hexo-generator-feed hexo-generator-index hexo-generator-tag # or `npm i --save hexo-renderer-ejs hexo-generator-archive hexo-generator-category-enhance hexo-generator-feed hexo-generator-index hexo-generator-tag` for npm users
Cloning the theme
cd themes git clone https://github.com/SumiMakito/hexo-theme-Journal.git journal cd journal yarn install # or `npm i` for npm users
Applying the theme
Find the _config.yml file at your Hexo root directory and apply the theme.
Post items and pages
Generally speaking, a post file in source/_posts or a page file always begins with a header in the following format.
--- title: 吾輩は猫である intro: 吾輩は猫である。名前はまだない。 featured_image: neko.jpg date: 2018-11-11 12:00:00 tags: - Novel - Japanese ---
Maybe you've already noticed that there're two new fields named
featured_image. These two optional fields are used to optimize post items' appearance.
intro is set, the value will be used as abstract instead of the automatically truncated one. Also, by editing the _config.yml in theme Journal.'s directory, you are able to control the truncation length for all articles.
... truncate_len: 60 ...
featured_image presents, the image specified will show up in the post item, also, the feature image will show up in the detailed post's or page's page. In this example, the
neko.jpg is placed in the asset folder for the post or page.
New in 2.0.3:
featured_image can now be an URL starts with
Title and subtitle
The title area of the theme Journal. consists two parts — the title and the subtitle.
Edit the _config.yml in theme Journal.'s directory:
sidebar_title: "Journal." sidebar_subtitle: "隻言片語<br>於此匯聚"
sidebar_subtitle, HTML is supported as the example above demonstrated.
By default, the 'Archives' entry will not appear in the navigation section. To show the 'Archives' in the navigation section, you will need to enable the archives explicitly in the theme-level _config.yml.
The generation of archives will be done by
hexo-generator-archive. So please ensure that it has been added as a dependency in your package.json.
By adding the following line to the _config.yml in theme Journal.'s directory, an RSS entry will show up in the navigation drawer which points to the location specified.
hexo-generator-feedis usually required for this function.
The theme Journal. natively supports two commenting services – Livere and Disqus. To enable commenting, you just need to add one of the following lines to the _config.yml in theme Journal.'s directory.
livere: [data-uid] on livere.com disqus: [short_name] on disqus.com
If two fields are both left non-empty, two comment boxes will appear. To fix this, just leave one of the two fields empty.
You are free to choose whether or not to disable commenting on some posts or pages at all times as you like it since you're the owner.
You can disable commenting just by adding one line of code in the header of a post or page file.
--- ... no_comments: true ... ---
When a page is created, its entry will automatically show up in the global navigation drawer on the left side of the screen.
The theme Journal. natively supports syntax highlighting. However, the plugin
hexo-prism-plugin is required. You can install it by running
yarn add hexo-prism-plugin or
npm i --save hexo-prism-plugin at your Hexo root directory.
Table of contents
With the plugin
hexo-toc, the theme Journal. natively supports showing the table of contents in an article. You can install it by running
yarn add hexo-toc or
npm i --save hexo-toc at your Hexo root directory.
Then, you can insert
<!-- toc --> after the header of the post file to enable table of contents.
Support the developer
If you find my work awesome and useful, please consider donating. It is your support that helps me to do better!