Get lastest version of artifact for your vuepress doc
yarn add -D vuepress-plugin-lastest-version
# OR npm install -D vuepress-plugin-lastest-version
module.exports = {
plugins: [
"lastest-version",
{
repos: [
{
keywords: "mybatis-plus-latest-version",
type: "maven",
repo: "com.baomidou/mybatis-plus",
}
]
}
]
};
- type: string
- requried: true
- value: your keywords
The keywords which will be replaced
- type: string
- requried: true
- value: maven | npm
Choose which artifact type need get lastest version
- type: string
- requried: true
- value: your repo
When type is maven, your repo value is :groupId/:artifactId When type is npm, your repo value is :packageName
e.g.
module.exports = {
plugins: [
"lastest-version",
{
repos: [
{
keywords: "mybatis-plus-latest-version",
type: "maven",
repo: "com.baomidou/mybatis-plus",
}
]
}
]
};
module.exports = {
plugins: [
"lastest-version",
{
repos: [
{
keywords: "vuepress-plugin-latest-version",
type: "npm",
repo: "vuepress-plugin-lastest-version",
}
]
}
]
};
After configuration, the plugin will replace all keywords character to really lastest version.
So, don't forgot to add keywords placeholder to your document so that this plugin can change version normally.