Adding a Thumbnail to Your Article

You can add thumbnail images to your posts in two steps. First, make sure the thumbnail is enabled in the theme’s configuration file:

_config.yml
1
2
article:
thumbnail: true

Then, provide an URL or path to the image file in the front-matter of your post:

post.md
1
2
3
4
title: Getting Started with Icarus
thumbnail: /gallery/thumbnails/desert.jpg
---
Post content...

About thumbnail image path

The image path you put in the front-matter needs to be the relative path to the source directory of your website. For example, if you want to use the following image as a thumbnail:

1
<your blog>/source/gallery/image.jpg

You need to use the following as the image path:

1
/gallery/image.jpg

Also, it is recommended that you put all the images under a dedicated asset folder that is separated from the _posts folder.

Table of Contents / Catalogue

To display a Table of Contents / Catalogue (toc) widget on a post page, please first add toc: true to the front-matter of your post Markdown file:

post.md
1
2
3
4
title: Table of Contents Example
toc: true
---
Post content...

Then, add the toc widget to the theme’s configuration file:

_config.yml
1
2
3
4
widgets:
-
type: toc
position: left

Hexo Built-in Tag Helpers

The following content is directly copied from Hexo official documentation

Tag plugins are different from post tags. They are ported from Octopress and provide a useful way for you to quickly add specific content to your posts.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×