Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
chore!(meta): remove some of twitter meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmarrec committed Nov 23, 2022
1 parent 2e42886 commit 6b09f53
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
5 changes: 1 addition & 4 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ export default defineNuxtModule<PWAOptions>({
ogImage: true,
ogHost: undefined,
ogUrl: true,
twitterCard: undefined,
twitterCard: 'summary',
twitterSite: undefined,
twitterTitle: undefined,
twitterDescription: undefined,
twitterImage: undefined,
twitterCreator: undefined,
},
workbox: {
Expand Down
12 changes: 0 additions & 12 deletions src/parts/meta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,6 @@ export default (pwa: PWAContext) => {
if (options.twitterSite)
addMeta(head, 'twitter:site', options.twitterSite)

// twitter:title
if (options.twitterTitle)
addMeta(head, 'twitter:title', options.twitterTitle)

// twitter:description
if (options.twitterDescription)
addMeta(head, 'twitter:description', options.twitterDescription)

// twitter:image
if (options.twitterImage && (options.ogHost || isUrl(options.twitterImage)))
addMeta(head, 'twitter:image', isUrl(options.twitterImage) ? options.twitterImage : joinURL(options.ogHost!, nuxt.options.app.baseURL, options.twitterImage))

// twitter:creator
if (options.twitterCreator)
addMeta(head, 'twitter:creator', options.twitterCreator)
Expand Down
5 changes: 1 addition & 4 deletions src/parts/meta/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ export interface MetaOptions {
ogImage: string | boolean | { path: string; width?: number; height?: number; type?: string }
ogHost: string | undefined
ogUrl: string | boolean
twitterCard: 'summary' | 'summary_large_image' | 'app' | 'player' | undefined
twitterCard: 'summary' | 'summary_large_image' | 'app' | 'player' | false
twitterSite: string | undefined
twitterTitle: string | undefined
twitterDescription: string | undefined
twitterImage: string | undefined
twitterCreator: string | undefined
}

0 comments on commit 6b09f53

Please sign in to comment.