vuepress-theme-hope

vuepress-plugin-reading-time2

Expect reading time and word count statistics

This plugin will inject expect reading time and word count statistics into the page object.

Will automatically inject readingTime into the page object:

interface ReadingTime {
  /** Expect reading minute */
  minutes: number;
  /** Words count */
  words: number;
}

How to use

Install

Usage

Plugin Options

wordPerMinute

  • Type: number
  • Default: 300

Reading speed (words per minute)

locales

  • Type: ReadingTimeLocaleConfig

    interface ReadingTimeLocaleData {
      /**
       * Word template, `$word` will be automatically replaced by actual words
       */
      word: string;
    
      /**
       * Text for less than one minute
       */
      less1Minute: string;
    
      /**
       * Time template
       */
      time: string;
    }
    
    interface ReadingTimeLocaleConfig {
      [localePath: string]: ReadingTimeLocaleData;
    }
    
  • Required: No

Locales config for reading-time plugin.

Built-in Supported Languages
  • Simplified Chinese (zh-CN)
  • Traditional Chinese (zh-TW)
  • English (United States) (en-US)
  • German (de-AT)
  • Russian (ru-RU)
  • Ukrainian (uk-UA)
  • Vietnamese (vi-VN)
  • Portuguese (Brazil) (pt-BR)
  • Polish (pl-PL)
  • French (fr-FR)
  • Spanish (es-ES)
  • Slovak (sk-SK)
  • Japanese (ja-JP)
  • Turkish (tr-TR)
  • Korean (ko-KR)