Skip to content

Commit

Permalink
add open graphs and canonical
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-gg-dev committed Dec 20, 2023
1 parent 4d3711c commit 81faf0c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,19 @@ export default defineConfig({
lastUpdated: true,

head: [
['link', { rel: 'icon', href: '/favicon.ico' }]
['link', { rel: 'icon', href: '/favicon.ico' }],
['meta', { property: 'og:type', content: 'website' }],
['meta', { property: 'og:image', content: '/og-image.png' }]
],
transformHead(context) {
const canonical = context.page.replace(/(index)?\.md$/, '')

return [
['meta', { property: 'og:title', content: context.title }],
['meta', { property: 'og:url', content: `https://bashunit.typeddevs.com/${canonical}` }],
['link', { rel: 'canonical', href: `https://bashunit.typeddevs.com/${canonical}` }],
]
},

sitemap: {
hostname: 'https://bashunit.typeddevs.com'
Expand Down
Binary file added docs/public/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 81faf0c

Please sign in to comment.