@vuepress-denaro/vuepress-plugin-dynamic-title
v1.3.1
Published
Add a dynamic title to your site.给你的站点添加动态标题的支持插件.
Downloads
37
Maintainers
Readme
vuepress-plugin-dynamic-title
:tada: Add a dynamic title to your site.给你的站点添加动态标题的支持插件.
Usage
- Install
# npm
npm install @vuepress-denaro/vuepress-plugin-dynamic-title
# yarn
yarn add @vuepress-denaro/vuepress-plugin-dynamic-title
- Update
plugins
in.vuepress/config.js
or.vuepress/config.ts
js
const {
dynamicTitlePlugin,
} = require('@vuepress-denaro/vuepress-plugin-dynamic-title')
module.exports = {
plugins: [
dynamicTitlePlugin({
showIcon: '', // The icon displayed when the document is in the current tab.
showText: '(/≧▽≦/)咦!又好了!', // The title displayed when the document is in the current tab.
hideIcon: '', // The icon displayed when the document is not in the current tab.
hideText: '(●—●)喔哟, 崩溃啦!', // The title displayed when the document is not in the current tab.
recoverTime: 2000, // The time to recover the title after the tab is changed.
}),
],
}
ts
import { dynamicTitlePlugin } from '@vuepress-denaro/vuepress-plugin-dynamic-title'
import { defineUserConfig } from '@vuepress/cli'
export default defineUserConfig({
plugins: [
dynamicTitlePlugin({
showIcon: '', // The icon displayed when the document is in the current tab.
showText: '(/≧▽≦/)咦!又好了!', // The title displayed when the document is in the current tab.
hideIcon: '', // The icon displayed when the document is not in the current tab.
hideText: '(●—●)喔哟, 崩溃啦!', // The title displayed when the document is not in the current tab.
recoverTime: 2000, // The time to recover the title after the tab is changed.
}),
],
})
Configurations
showIcon
- type:
string
- default:
''
The icon displayed when the document is in the current tab.
showText
- type:
string
- default:
'(/≧▽≦/)咦!又好了!'
The title displayed when the document is in the current tab.
hideIcon
- type:
string
- default:
''
The icon displayed when the document is not in the current tab.
hideText
- type:
string
- default:
'(●—●)喔哟, 崩溃啦!'
The title displayed when the document is not in the current tab.
recoverTime
- type:
number
- default:
2000
The time to recover the title after the tab is changed.