Posts
Article Styles

Article Style articles

Style

Font Size

Configuration Option: articles.style.font_size

TypeNotePossible ValuesDefault Value
StringNot recommended to change unless necessary"*px""16px"

Line Height

Configuration Option: articles.style.line_height

TypeNotePossible ValuesDefault Value
NumberNot recommended to change unless necessary1-51.5

Image Border Radius

Configuration Option: articles.style.image_border_radius

TypePossible ValuesDefault Value
String"*px""14px"

Image Alignment

Configuration Option: articles.style.image_alignment

TypePossible ValuesDefault Value
Stringleft | centercenter

Image Caption

When enabled, the image description will be displayed below the image based on the alt attribute.

Configuration Option: articles.style.image_caption

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Link Icon

Whether to display an icon after the links in the article.

Screenshot 2023-04-16 at 12.13.52 PM

Configuration Option: articles.style.link_icon

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Word Count

Requires installation of the hexo-wordcount plugin.

Please execute the following command to install:

npm install hexo-wordcount

Switch

Configuration Option: articles.word_count.enable

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Count

Configuration Option: articles.word_count.count

image-20230322185551093

Whether to enable word count.

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Reading Time

Configuration Option: articles.word_count.min2read

image-20230322185517876

Whether to enable reading time calculation.

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Author Label

image-20230322185748775

Switch

Configuration Option: articles.author_label.enable

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Automatic Label

Configuration Option: articles.author_label.auto

Automatically adds labels such as Lv1, Lv2, Lv3.

TypePossible ValuesDefault Value
Booleantrue | falsefalse

Custom Tags

Configuration Item: articles.author_label.list

List of custom tags.

TypeNoteExample
ArrayPlease separate with commas["Lv1", "Lv2", "Lv3"]

Code Blocks

Copy Button

Configuration Item: articles.code_block.copy

Whether to enable the copy button for code blocks.

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Style

Configuration Item: articles.code_block.style

TypePossible ValuesDefault Value
Stringmac | simplemac

mac style:

image-20230322190223745

simple style:

image-20230322190426252

Font

Configuration Item: articles.code_block.font

  • enable: Whether to enable custom font.
  • family: Font name.
  • url: URL to the font CSS style file, such as Google Fonts' https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600;700&display=swap.

Table of Contents

Toggle

Configuration Item: articles.toc.enable

Whether to enable the table of contents.

TypePossible ValuesDefault Value
Booleantrue | falsetrue

image-20230322190540233

Maximum Depth

Configuration Item: articles.toc.max_depth

Set the maximum depth of the table of contents.

TypePossible ValuesDefault Value
Number1-63

Numbering

Configuration Item: articles.toc.number

Whether to enable numbering for the table of contents.

image-20230322191503471

Expand All

Configuration Item: articles.toc.expand

Whether to expand all sections of the table of contents.

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Default Open TOC

Configuration Item: articles.toc.init_open

Whether to default open the table of contents.

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Article Copyright

Toggle

Configuration Name: articles.copyright.enable

Whether to display copyright information at the end of the article.

TypeOptionsDefault
Boolean`truefalse`

Default Copyright Information

Configuration Item: articles.copyright.default

Options:

Custom Copyright Information

To customize the copyright information used in an article, add the license field in the article's Front-matter, for example:

---
title: Hello World
date: 2021-03-22 19:20:00
license: all_rights_reserved
---

Refer to the above explanation for options.

Note that if your article's Front-matter contains a license field, this value will override the default.

If the above options do not meet your needs, you can use copyright in the theme configuration file to customize explanatory information, like:

---
title: Hello World
date: 2021-03-22 19:20:00
copyright: This article is written nonsensically. If you choose to use it, you do so at your own risk.
---
⚠️

Note that the copyright item has a higher priority than license. So if you write both, only copyright will be effective.

Lazy Load

Configuration Item: articles.lazyload

Whether to enable lazy loading for images. Especially effective for blogs with many images, it can speed up page loading.

TypePossible ValuesDefault Value
Booleantrue | falsetrue

Article Recommendation

Automatically recommend related articles based on article keywords.

You need to install the nodejieba module. Migrated from hexo-theme-volantis.

Please execute the following command to install:

npm install nodejieba@2.5.2

Switch

Configuration item name: articles.recommendation.enable

Enable or disable article recommendation.

TypePossible ValuesDefault
Booleantrue | falsefalse

Title

Configuration item name: articles.recommendation.title

The title of the article recommendation section.

TypeNoteDefault
StringNoneRecommended Articles

Number of Recommendations

Configuration item names: articles.recommendation.limit and articles.recommendation.mobile_limit

limit refers to the number of recommended articles on desktop, while mobile_limit refers to the number of recommended articles on mobile.

TypePossible ValuesDefault
Number1-103

Excluded Directories

Configuration item name: articles.recommendation.skip_dirs

Directories to exclude when recommending articles.

TypeNoteExample
ArrayPlease separate with commas["/docs/", "/private/"]