Skip to content

Conversation

@Mister-Hope
Copy link
Member

No description provided.

* Enable @vuepress/plugin-external-link-icon or not
*/
externalLinkIcon?: boolean
externalLinkIcon?: ExternalLinkIconPluginOptions | boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to keep themePlugins consistent, i.e. keep externalLinkIcon?: boolean here.

We can still keep the openInNewWindow locale config, and use a resolveExternalLinkIconPluginOptions util to resolve the options.

/**
* i18n config
*/
i18n: Record<string, string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep consistent with other plugins like plugin-pwa-popup or plugin-search.

locales?: LocaleConfig<{
  openInNewWindow: string
}>

@meteorlxy meteorlxy changed the title feat(plugin-external-link-icon): use i18n hint as icon default slot feat(plugin-external-link-icon): add locales option Jan 21, 2022
@meteorlxy meteorlxy merged commit c7f0c43 into vuepress:main Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants