Skip to content

Commit

Permalink
feat: improve seo meta
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Jul 29, 2023
1 parent 76f6bbb commit bb95955
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/pages/naivebayes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
title: getMetaTitle(repository),
keywords: getMetaKeywords(repository).join(','),
description: getMetaDescription(repository),
ogUrl: getPageURL(route),
ogImage: getGitHubOpenGraphImageURL(repository),
ogUrl: getPageURL(route)
ogImageWidth: 1200,
ogImageHeight: 600
})
)
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/readme-md.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
title: getMetaTitle(repository),
keywords: getMetaKeywords(repository).join(','),
description: getMetaDescription(repository),
ogUrl: getPageURL(route),
ogImage: getGitHubOpenGraphImageURL(repository),
ogUrl: getPageURL(route)
ogImageWidth: 1200,
ogImageHeight: 600
})
)
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/videojs-player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
title: getMetaTitle(repository),
keywords: getMetaKeywords(repository).join(','),
description: getMetaDescription(repository),
ogUrl: getPageURL(route),
ogImage: getGitHubOpenGraphImageURL(repository),
ogUrl: getPageURL(route)
ogImageWidth: 1200,
ogImageHeight: 600
})
)
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/vue-awesome-swiper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
title: getMetaTitle(repository),
keywords: [getMetaKeywords(repository), `How to use Swiper on vue3?`].join(','),
description: getMetaDescription(repository),
ogUrl: getPageURL(route),
ogImage: getGitHubOpenGraphImageURL(repository),
ogUrl: getPageURL(route)
ogImageWidth: 1200,
ogImageHeight: 600
})
)
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/vue-codemirror.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
title: getMetaTitle(repository),
keywords: getMetaKeywords(repository).join(','),
description: getMetaDescription(repository),
ogUrl: getPageURL(route),
ogImage: getGitHubOpenGraphImageURL(repository),
ogUrl: getPageURL(route)
ogImageWidth: 1200,
ogImageHeight: 600
})
)
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/vue-drag-zone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
title: getMetaTitle(repository),
keywords: getMetaKeywords(repository).join(','),
description: getMetaDescription(repository),
ogUrl: getPageURL(route),
ogImage: getGitHubOpenGraphImageURL(repository),
ogUrl: getPageURL(route)
ogImageWidth: 1200,
ogImageHeight: 600
})
)
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/vue-quill-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
title: getMetaTitle(repository),
keywords: getMetaKeywords(repository).join(','),
description: getMetaDescription(repository),
ogUrl: getPageURL(route),
ogImage: getGitHubOpenGraphImageURL(repository),
ogUrl: getPageURL(route)
ogImageWidth: 1200,
ogImageHeight: 600
})
)
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/vue-touch-ripple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
title: getMetaTitle(repository),
keywords: getMetaKeywords(repository).join(','),
description: getMetaDescription(repository),
ogUrl: getPageURL(route),
ogImage: getGitHubOpenGraphImageURL(repository),
ogUrl: getPageURL(route)
ogImageWidth: 1200,
ogImageHeight: 600
})
)
</script>
Expand Down
4 changes: 1 addition & 3 deletions src/transforms/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export const normalizeSeoMetaObject = (i: SeoMetaObject): Parameters<typeof useS
ogDescription: () => i.ogDescription ?? i.description ?? APP_META.description,
ogUrl: () => i.ogUrl ?? '',
ogImage: () => i.ogImage ?? '',
ogImageAlt: () => i.ogImageAlt ?? i.ogDescription ?? i.description ?? APP_META.description,
ogImageWidth: () => i.ogImageWidth ?? (i.ogImage ? '' : '1200'),
ogImageHeight: () => i.ogImageHeight ?? (i.ogImage ? '' : '600')
ogImageAlt: () => i.ogImageAlt ?? i.ogDescription ?? i.description ?? APP_META.description
}
}

0 comments on commit bb95955

Please sign in to comment.