The
vuepress
blog theme inherited from@vuepress/theme-default
, supports archiving and tagging functions, and can automatically sort blogs by time.
https://www.npmjs.com/package/vuepress-theme-inherit
https://yasinchan.com
Source code
Note: The following operations can be found in the official document. Please familiarize yourself with the documentation first.
After install and configure the basic vuepress framework, do the following operations:
- Install
yarn add vuepress-theme-inherit
- Create a
/post
/tags
/archives
directory under the/doc
directory to load the blog homepage list, tags and archive functions.. ├── docs │ ├── tags │ │ └── README.md │ ├── archives │ │ └── README.md │ ├── post │ │ └── README.md | |
- Add the following configration in the
config.js
to import the theme and generate the navigation bar.theme: 'vuepress-theme-inherit', themeConfig: { nav: [ ... {text: 'blog', link: '/post/'}, {text: 'tags', link: '/tags/'}, {text: 'archives', link: '/archives/'}, ... ] },
- Add the following keywords in the blog markdown file Front Matter to let the script sort
Options
--- created: 2020-1-1 updated: 2020-2-1 tags: - Configration - Technology - Life ---
created
andupdated
is used to record the creation and editing time of the blog, as well as used to sort the blog homepage (sort rule : update -> created -> no configration).created
also used to sort the archives.tags
is used to filter the tags.- Blog homepage will create the blog list, base on the markdown files you created under the
/post
directory automatically. - These above functions will be automatically configured without additional operations.
- The
README.md
under the three folders of/archives
/tags
/post
can be accessed through Front Matter to set the relevant page information include title, keywords and descriptions
- Pagination
- Better SEO