Skip to main content

Plugin Options

About 1 min

components

  • Type: AvailableComponent[]

    type AvailableComponent =
      | "ArtPlayer"
      | "AudioPlayer"
      | "Badge"
      | "BiliBili"
      | "CodePen"
      | "FontIcon"
      | "PDF"
      | "Replit"
      | "Share"
      | "StackBlitz"
      | "SiteInfo"
      | "VPBanner"
      | "VPCard"
      | "VidStack"
      | "VideoPlayer"
      | "XiGua"
      | "YouTube";
    
  • Default: []

Components to be registered.

Available component names:

  • "ArtPlayer"
  • "AudioPlayer"
  • "Badge"
  • "BiliBili"
  • "CodePen"
  • "FontIcon"
  • "PDF"
  • "Replit"
  • "Share"
  • "StackBlitz"
  • "SiteInfo"
  • "VPBanner"
  • "VPCard"
  • "VidStack"
  • "VideoPlayer"
  • "XiGua"
  • "YouTube"

componentsOptions

Global config for components.

componentsOptions.artPlayer

componentsOptions.share.services

Share services

componentsOptions.share.contentSelector

  • Type: string
  • Default: .theme-default-content

Page content selector.

componentsOptions.share.twitterUserName

  • Type: string
  • Required: No

Twitter username.

componentsOptions.fontIcon.assets

  • Type: FontIconAssets

    type Link =
      | `/${string}`
      | `//${string}`
      | `http://${string}`
      | `https://${string}`;
    
    type BuiltInFontIcon =
      | "iconify"
      | "iconfont"
      | "fontawesome"
      | "fontawesome-with-brands";
    
    type FontIconAssets = BuiltInFontIcon | Link | (BuiltInFontIcon | Link)[];
    
  • Required: No

  • Details:

Link of font icon asset, 'iconfont' and 'fontawesome' keywords are supported.

componentsOptions.fontIcon.prefix

Class prefix of font icon

componentsOptions.pdf.pdfjs

Location to pdfjs viewer.

rootComponents

Components to be mounted at root.

rootComponents.notice

  • Type: NoticeOptions

    interface NoticeActionOption {
      /**
       * Action text
       */
      text: string;
      /**
       * Action link
       */
      link?: string;
      /**
       * Action type
       *
       * @default 'default
       */
      type?: "primary" | "default";
    }
    
    interface NoticeItemOptions {
      /**
       * Notice title
       */
      title: string;
    
      /**
       * Notice content
       */
      content: string;
    
      /**
       * Notice key
       *
       * @description Used to identify and store the notice status
       */
      key?: string;
    
      /**
       * Whether show notice only once or show it in every visit
       *
       * @description If `key` is not provided, this option will be ignored
       *
       * @default false
       */
      showOnce?: boolean;
    
      /**
       * Whether the notice shall be confirmed
       *
       * @default false
       */
      confirm?: boolean;
    
      /**
       * Whether the notice should appear fullscreen
       *
       * @default false
       */
      fullscreen?: boolean;
    
      /**
       * Notice actions
       */
      actions?: NoticeActionOption[];
    }
    
    type NoticeOptions = NoticeItemOptions &
      ({ path: string } | { match: RegExp });
    
  • Required: No

  • Details:

Config for global notice.

locales

Component locales.

locales.pdf

  • Type: PDFLocaleConfig

    interface PDFLocaleData {
      /**
       * PDF hint text
       *
       * @description Only used if the browser does not support embedding PDF and no PDFJS URL is provided.
       * [url] will be replaced by actual PDF link.
       */
      hint: string;
    }
    
    interface PDFLocaleConfig {
      [localePath: string]: PDFLocaleData;
    }
    
  • Required: No

Locales config for pdf component.

Built-in Supported Languages
  • Simplified Chinese (zh-CN)
  • Traditional Chinese (zh-TW)
  • English (United States) (en-US)
  • German (de-DE)
  • German (Australia) (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)
  • Finnish (fi-FI)
  • Indonesian (id-ID)
  • Dutch (nl-NL)