Config

Mr.Hope ... 2021-2-28 Less than 1 minute

# Plugin Options

# author

  • Type: string
  • Required: No

Default author

# twitterID

  • Type: string
  • Required: No

Fill in your twitter username

# restrictions

  • Type: string
  • Required: No

The age rating of the content, the format is [int]+, such as '13+'

# seo

  • Type: (info: PageSeoInfo) => Record<string, string>

You can use this option to inject new or overwrite the default generated SEO, you need to return an object in the format of <property>: <content>.

# customMeta

  • Type: (meta: Meta[], info: PageSeoInfo) => void

You can use this option to directly inject any format of <meta> tags into <head>.

  • Interface of PageSeoInfo:

    interface PageSeoInfo {
      /** Current Page Object */
      page: Page;
      /** Vuepress Config  */
      site: SiteConfig;
      /** Current ThemeConfig */
      themeConfig: ThemeConfig | Record<string, never>;
      /** langs which are supported */
      locale: string[];
      /** Current page path */
      path: string;
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
  • The interface of Meta is Record<"content" | "name" | "charset" | "http-equiv", string>

    The key of the Meta object will be rendered as the attribute of the meta tag, and the value will be rendered as the value of the corresponding attribute.

    For details, please see Frontmatter → Meta (opens new window)