fix: seo complaining about missing lang html attribute

This commit is contained in:
lesion 2025-01-13 20:05:07 +01:00
parent 7151cbbf76
commit d615b1c537
No known key found for this signature in database
GPG key ID: 352918250B012177
10 changed files with 27 additions and 4 deletions

View file

@ -85,6 +85,9 @@ export default {
},
head () {
return {
htmlAttrs: {
lang: this.settings.instance_locale
},
title: this.settings.title + ' - ' + this.$t('common.login')
}
}

View file

@ -77,6 +77,9 @@ export default {
},
head () {
return {
htmlAttrs: {
lang: this.settings.instance_locale
},
title: this.settings.title + ' - ' + this.$t('common.register')
}
}

View file

@ -21,6 +21,9 @@ export default {
},
head () {
return {
htmlAttrs: {
lang: this.settings.instance_locale
},
title: `${this.settings.title} - ${this.$t('common.info')}`
}
},

View file

@ -30,6 +30,9 @@ export default {
return {}
}
return {
htmlAttrs: {
lang: this.settings.instance_locale
},
title: `${this.settings.title} - ${this.announcement.title}`
}
},

View file

@ -23,6 +23,9 @@ export default {
const title = `${this.settings.title} - ${this.collection}`
return {
title,
htmlAttrs: {
lang: this.settings.instance_locale
},
link: [
{ rel: 'alternate', type: 'application/rss+xml', title, href: this.settings.baseurl + `/feed/rss/collection/${this.collection}` },
{ rel: 'alternate', type: 'text/calendar', title, href: this.settings.baseurl + `/feed/ics/collection/${this.collection}` }

View file

@ -188,6 +188,9 @@ export default {
return {
title: `${this.settings.title} - ${this.event.title}`,
htmlAttrs: {
lang: this.settings.instance_locale
},
meta: [
// hid is used as unique identifier. Do not use `vmid` for it as it will not work
{

View file

@ -122,6 +122,9 @@ export default {
},
head () {
return {
htmlAttrs: {
lang: this.settings.instance_locale
},
title: `${this.settings.title} - ${this.$t('common.export')}`,
}
},

View file

@ -62,12 +62,10 @@ export default {
}
},
head () {
const i18nHead = this.$nuxtI18nHead({ addSeoAttributes: true })
return {
title: this.settings.title,
htmlAttrs: {
lang: this.settings.instance_locale,
...i18nHead.htmlAttrs
},
meta: [
// hid is used as unique identifier. Do not use `vmid` for it as it will not work
@ -76,14 +74,12 @@ export default {
{ hid: 'og-title', property: 'og:title', content: this.settings.title },
{ hid: 'og-url', property: 'og:url', content: this.settings.baseurl },
{ property: 'og:image', content: this.settings.baseurl + '/logo.png' },
...i18nHead.meta
],
link: [
{ rel: 'apple-touch-icon', href: this.settings.baseurl + '/logo.png' },
{ rel: 'alternate', type: 'application/rss+xml', title: this.settings.title, href: this.settings.baseurl + '/feed/rss' },
{ rel: 'alternate', type: 'text/calendar', title: this.settings.title, href: this.settings.baseurl + '/feed/ics' },
{ rel: 'me', href: `${this.settings.baseurl}/federation/u/${this.settings.instance_name}`},
...i18nHead.link
]
}
},

View file

@ -43,6 +43,9 @@ export default {
const title = `${this.settings.title} - ${this.place.name}`
return {
title,
htmlAttrs: {
lang: this.settings.instance_locale
},
link: [
{ rel: 'alternate', type: 'application/rss+xml', title, href: this.settings.baseurl + `/feed/rss/place/${this.place.id}` },
{ rel: 'alternate', type: 'text/calendar', title, href: this.settings.baseurl + `/feed/ics/place/${this.place.id}` }

View file

@ -24,6 +24,9 @@ export default {
const title = `${this.settings.title} #${tag}`
return {
title,
htmlAttrs: {
lang: this.settings.instance_locale
},
link: [
{ rel: 'alternate', type: 'application/rss+xml', title, href: this.settings.baseurl + `/feed/rss/tag/${tag}` },
{ rel: 'alternate', type: 'text/calendar', title, href: this.settings.baseurl + `/feed/ics/tag/${tag}` }