1.3.1 • Published 6 months ago

@vuepress-denaro/vuepress-plugin-dynamic-title v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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.

Thanks

vuepress-plugin-dynamic-title