Skip to main content

Options

About 1 min

Plugin Options

author

  • Type: string | ((page: Page) => string)
  • Required: No

Author Information

license

  • Type: string | ((page: Page) => string)
  • Required: No

License Information

triggerLength

  • Type: number
  • Default: 100

Min content length triggering copyright append

maxLength

  • Type: number
  • Default: 0

Max content length which allows to copy.

0 means no limit.

global

  • Type: boolean
  • Default: false

Whether enabled globally

disableCopy

  • Type: boolean
  • Default: false

Disable copy

disableSelection

  • Type: boolean
  • Default: false

Disable selection

canonical

  • Type: string
  • Required: No

Canonical hostname with base.

This is useful when your content are deploying in multiple places.

Example

If you are deploying same content under https://myblog.com and https://blog.com/username/, you may want to prefer one site as reference link.

  • If you prefer the first one, you should set canonical to https://myblog.com
  • If you prefer the second one, you should set canonical to https://blog.com/username/

So copyright message triggered by copying content on another site also points to your preferred site.

locales

  • Type: CopyrightLocaleConfig

    interface CopyrightLocaleData {
      /**
       * Author text
       *
       * @description `:author` will be replaced by author
       */
      author: string;
    
      /**
       * License text
       *
       * @description `:license` will be replaced by current license
       */
      license: string;
    
      /**
       * Link text
       *
       * @description `:url` will be replaced by current page link
       */
      link: string;
    }
    
    interface CopyrightLocaleConfig {
      [localePath: string]: CopyrightLocaleData;
    }
    
  • Required: No

Locale config for copyright plugin.

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)

Frontmatter Options

copy.triggerLength

  • Type: number
  • Default: 100

Min content length triggering copyright append

copy.maxLength

  • Type: number
  • Default: 0

Max content length which allows to copy.

0 means no limit.

copy.disableCopy

  • Type: boolean
  • Default: false

Disable copy

copy.disableSelection

  • Type: boolean
  • Default: false

Disable selection