Skip to main content

Plugin Options

About 2 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.fontIcon.assets

  • Type: FontIconAssets

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

  • Details:

Link of font icon asset, 'iconify' 'fontawesome' and 'fontawesome-with-brands' keywords are supported.

componentsOptions.fontIcon.prefix

Class prefix of font icon

componentsOptions.pdf.pdfjs

Location to pdfjs viewer.

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.

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.

locales.siteInfo

  • Type: SiteInfoLocaleConfig

    interface SiteInfoLocaleData {
      /**
       * Source text
       *
       * 源代码文字
       */
      source: string;
    }
    
    interface SiteInfoLocaleConfig {
      [localePath: string]: SiteInfoLocaleData;
    }
    
  • Required: No

Locales config for site info component.

locales.vidstack

  • Type: VidstackLocaleConfig

    interface VidstackLocaleData {
      "Caption Styles": string;
      "Captions look like this": string;
      "Closed-Captions Off": string;
      "Closed-Captions On": string;
      "Display Background": string;
      "Enter Fullscreen": string;
      "Enter PiP": string;
      "Exit Fullscreen": string;
      "Exit PiP": string;
      "Google Cast": string;
      "Keyboard Animations": string;
      "Seek Backward": string;
      "Seek Forward": string;
      "Skip To Live": string;
      "Text Background": string;
      Accessibility: string;
      AirPlay: string;
      Announcements: string;
      Audio: string;
      Auto: string;
      Boost: string;
      Captions: string;
      Chapters: string;
      Color: string;
      Connected: string;
      Connecting: string;
      Continue: string;
      Default: string;
      Disabled: string;
      Disconnected: string;
      Download: string;
      Family: string;
      Font: string;
      Fullscreen: string;
      LIVE: string;
      Loop: string;
      Mute: string;
      Normal: string;
      Off: string;
      Opacity: string;
      Pause: string;
      PiP: string;
      Play: string;
      Playback: string;
      Quality: string;
      Replay: string;
      Reset: string;
      Seek: string;
      Settings: string;
      Shadow: string;
      Size: string;
      Speed: string;
      Text: string;
      Track: string;
      Unmute: string;
      Volume: string;
    }
    
    interface VidstackLocaleConfig {
      [localePath: string]: VidstackLocaleData;
    }
    
  • Required: No

Locales config for vidstack 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)