README
@yubisaki/vuepress-plugin-blog
Install
npm i @yubisaki/vuepress-plugin-blog
Usage
module.exports = {
plugins: ['@yubisaki/blog']
}
Options
pageEnhancers
Type:
Array
default: []
This option is the extend enhancers for extendPageData
tagUrl
Type:
string
default:
/tag/
This option is the path which page show the tags or the posts of a specific tag
categoryUrl
Type:
string
default:
/category/
This option is the path which page show the categories or the posts of a specific category
example
module.exports = {
plugins: ['@yubisaki/blog', {
pageEnhancers,
tagUrl,
categoryUrl
}]
}
What can you get?
extendMarkdown
Vue.computed.$tags/Vue.computed.$categories
length
: The length of all the tagsmap
: Object of tagslist
: Array of tags data
[{ name, path, pages }]
name
: The tag name, such asReact
,Redux
path
: The path which page show the posts of a specific tag, for examplexxx.blog/tag/react
will show the posts(the pages field) which tag isreact
pages
: The posts which the tag field contains
Vue.computed.$tag/Vue.computed.$category
This value is a item of Vue.computed.$tags.list
which the name field equals to this.$route.meta.tagName
The Layout maybe your theme should support
Tags
: This layout is used to show the tags page, such asxxx.blog/tag/
Tag
: This layout is used to show the posts which tag equals to tag url, for examplexxx.blog/tag/react
will show the posts which tag isreact
Categories
: As same as the Tags layoutCategory
: As same as the Tag layout