@vuepress-denaro/vuepress-plugin-dynamic-title
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

vuepress-plugin-dynamic-title

🎉 Add a dynamic title to your site.给你的站点添加动态标题的支持插件.

npm version GitHub stars GitHub issues
jsdelivr NPM

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.

Thanks

vuepress-plugin-dynamic-title

Package Sidebar

Install

npm i @vuepress-denaro/vuepress-plugin-dynamic-title

Weekly Downloads

12

Version

1.3.1

License

MIT

Unpacked Size

11.2 kB

Total Files

21

Last publish

Collaborators

  • vxhly