mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-21 17:05:22 +03:00
chore: add basic open graph metadata
This commit is contained in:
parent
07808384bf
commit
3f9e39d244
2 changed files with 17 additions and 0 deletions
9
app.vue
9
app.vue
|
@ -2,6 +2,15 @@
|
|||
setupPageHeader()
|
||||
provideGlobalCommands()
|
||||
|
||||
const route = useRoute()
|
||||
if (process.server && !route.path.startsWith('/settings')) {
|
||||
useHead({
|
||||
meta: [
|
||||
{ property: 'og:url', content: `https://elk.zone${route.path}` },
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
// We want to trigger rerendering the page when account changes
|
||||
const key = computed(() => `${currentUser.value?.server ?? currentServer.value}:${currentUser.value?.account.id || ''}`)
|
||||
</script>
|
||||
|
|
|
@ -132,6 +132,14 @@ export default defineNuxtConfig({
|
|||
],
|
||||
meta: [
|
||||
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
|
||||
// open graph social image
|
||||
{ property: 'og:title', content: 'Elk' },
|
||||
{ property: 'og:type', content: 'website' },
|
||||
{ property: 'og:image', content: 'https://elk.zone/elk-og.png' },
|
||||
{ property: 'og:image:width', content: '3800' },
|
||||
{ property: 'og:image:height', content: '1900' },
|
||||
{ property: 'og:site_name', content: 'Elk' },
|
||||
{ property: 'twitter:site', content: '@elk_zone' },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue