0%

Optimization Settings for Hexo

Tags

Add Tags

  • Git Bash in ./blog/ and run command

    1
    $ hexo new pages tags
  • If successful

    INFO Validating config
    INFO Created: D:\Blog\source\tags\index.md

  • Open index.md. It looks like

  • Add tpye: tags in the last line, store and close index.md.

  • When writing a post, add tags in the front-matter,e.g.,tags: hexo.

  • Display

Multi-tags

use tags: [tag1, tag2, tag3,...] to add multi-tags.

Categories

Similar to tags setting.

  • Git Bash in ./blog/ and run command

    1
    $ hexo new pages categories
  • If successful:

    INFO Validating config
    INFO Created: D:\Blog\source\categories\index-1.md

  • Open index.md. It looks like

  • Add tpye: categories in the last line, store and close index.md.

  • When writing a post, add categories in the front-matter,e.g.,categories: Hexo.

  • Display. It also presents the number of posts after category name.

Read More

In the default setting, Every post presents the full text in a list in the home page. We can set only abstract visible in the home page and click Read more to read the full post.

  • Add description: XXX in the front-matter.
  • Display. Only abstract in a list.
-------------End of blogThanks for your reading-------------