1.1.1 • Published 3 years ago
vuepress-plugin-latest-articles v1.1.1
VuePress Latest articles
Latest arricles plugin for VuePress
Show the latest n articles in your Vuepress blog.
Install
Install dependence.
npm install vuepress-plugin-latest-articles
# OR
yarn add vuepress-plugin-latest-articles
Usage
Add plugin in your vuepress config.
// .vuepress/config
module.exports = {
plugins: [
"latest-articles"
]
}
Now, you can using it in Markdown!
Simple:
<LatestArticles />
More:
<LatestArticles title="My Title" titleTag="h2" number="10" />
Config
date
The updated date base on git
, you can only use it with a git repository.
If you set date in frontmatter, it will cover updated date.
---
date: YYYY-MM-DD HH:MM:SS +/-TTTT
---
By default, pages order by last updated commit, you can set it to order by first commit.
// .vuepress/config
module.exports = {
plugins: [
"latest-articles",
{ orderByFirstCommit:true }
]
}
published
By default, all pages will show up.
Additionally, if there is a special page that you don't want to show up, you can set published to false in frontmatter:
---
published: false
---
title
- type:
String
- default:
"Latest Articles" | "近期文章"
The title.
titleTag
- type:
String
- default:
"h2"
The tag of title element.
number
- type:
Number
- default:
10
The number of articles.