Merge branch 'seo-fixes' into 'master'

Some seo tweaks

See merge request les/gancio!69
This commit is contained in:
les 2025-01-15 09:28:29 +00:00
commit 5f7de92317
13 changed files with 50 additions and 7 deletions

View file

@ -3,7 +3,14 @@
<NavHeader /> <NavHeader />
<!-- title --> <!-- title -->
<div class="text-center"> <h1 v-if="$route.name === 'index'" class="text-center">
<nuxt-link id="title" v-text="settings.title" to="/" />
<div
class="text-body-1 font-weight-light pb-3"
v-text="settings?.description"
/>
</h1>
<div v-else class="text-center">
<nuxt-link id="title" v-text="settings.title" to="/" /> <nuxt-link id="title" v-text="settings.title" to="/" />
<div <div
class="text-body-1 font-weight-light pb-3" class="text-body-1 font-weight-light pb-3"

View file

@ -5,7 +5,7 @@
<MyPicture v-if='!hide_thumbs' :event='event' thumb :lazy='lazy' /> <MyPicture v-if='!hide_thumbs' :event='event' thumb :lazy='lazy' />
<v-icon class='float-right mt-1 mr-1' v-if='event.parentId' color='success' v-text='mdiRepeat' /> <v-icon class='float-right mt-1 mr-1' v-if='event.parentId' color='success' v-text='mdiRepeat' />
<v-icon class='float-right mt-1 mr-1' v-if='isPast' color='warning' v-text='mdiTimerSandComplete'/> <v-icon class='float-right mt-1 mr-1' v-if='isPast' color='warning' v-text='mdiTimerSandComplete'/>
<h1 class='title p-name' itemprop="name">{{ event.title }}</h1> <h2 class='title p-name' itemprop="name">{{ event.title }}</h2>
</nuxt-link> </nuxt-link>
<v-img contain v-if='event?.ap_user?.image' :src='event?.ap_user?.image' max-height=30 max-width=30 style="position: absolute; top: 5px; right: 5px;" /> <v-img contain v-if='event?.ap_user?.image' :src='event?.ap_user?.image' max-height=30 max-width=30 style="position: absolute; top: 5px; right: 5px;" />

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -3,7 +3,7 @@
//- EVENT PAGE //- EVENT PAGE
//- gancio supports microformats (http://microformats.org/wiki/h-event) //- gancio supports microformats (http://microformats.org/wiki/h-event)
//- and microdata https://schema.org/Event //- and microdata https://schema.org/Event
.title.text-center.text-md-h4.text-h5.pa-6 h1.title.text-center.text-md-h4.text-h5.pa-6
strong.p-name.text--primary(itemprop="name") {{event.title}} strong.p-name.text--primary(itemprop="name") {{event.title}}
v-row v-row
v-col.col-12.col-md-8.pr-sm-2.pr-md-0 v-col.col-12.col-md-8.pr-sm-2.pr-md-0
@ -102,10 +102,10 @@
//- Next/prev arrow //- Next/prev arrow
.text-center.mt-5.mb-5 .text-center.mt-5.mb-5
v-btn.mr-2(nuxt icon outlined color='primary' v-btn.mr-2(nuxt icon outlined color='primary'
:to='`/event/${event.prev}`' :disabled='!event.prev') :to='event.prev && `/event/${event.prev}`' :disabled='!event.prev')
v-icon(v-text='mdiArrowLeft') v-icon(v-text='mdiArrowLeft')
v-btn(nuxt bottom right outlined icon color='primary' v-btn(nuxt bottom right outlined icon color='primary'
:to='`/event/${event.next}`' :disabled='!event.next') :to='event.next && `/event/${event.next}`' :disabled='!event.next')
v-icon(v-text='mdiArrowRight') v-icon(v-text='mdiArrowRight')
v-dialog(v-model='showEmbed' width='700px' :fullscreen='$vuetify.breakpoint.xsOnly') v-dialog(v-model='showEmbed' width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
@ -188,6 +188,9 @@ export default {
return { return {
title: `${this.settings.title} - ${this.event.title}`, title: `${this.settings.title} - ${this.event.title}`,
htmlAttrs: {
lang: this.settings.instance_locale
},
meta: [ meta: [
// hid is used as unique identifier. Do not use `vmid` for it as it will not work // 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 () { head () {
return { return {
htmlAttrs: {
lang: this.settings.instance_locale
},
title: `${this.settings.title} - ${this.$t('common.export')}`, title: `${this.settings.title} - ${this.$t('common.export')}`,
} }
}, },

View file

@ -64,19 +64,22 @@ export default {
head () { head () {
return { return {
title: this.settings.title, title: this.settings.title,
htmlAttrs: {
lang: this.settings.instance_locale,
},
meta: [ meta: [
// hid is used as unique identifier. Do not use `vmid` for it as it will not work // hid is used as unique identifier. Do not use `vmid` for it as it will not work
{ hid: 'description', name: 'description', content: this.settings?.description }, { hid: 'description', name: 'description', content: this.settings?.description },
{ hid: 'og-description', name: 'og:description', content: this.settings?.description }, { hid: 'og-description', name: 'og:description', content: this.settings?.description },
{ hid: 'og-title', property: 'og:title', content: this.settings.title }, { hid: 'og-title', property: 'og:title', content: this.settings.title },
{ hid: 'og-url', property: 'og:url', content: this.settings.baseurl }, { hid: 'og-url', property: 'og:url', content: this.settings.baseurl },
{ property: 'og:image', content: this.settings.baseurl + '/logo.png' } { property: 'og:image', content: this.settings.baseurl + '/logo.png' },
], ],
link: [ link: [
{ rel: 'apple-touch-icon', href: this.settings.baseurl + '/logo.png' }, { 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: '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: '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}`} { rel: 'me', href: `${this.settings.baseurl}/federation/u/${this.settings.instance_name}`},
] ]
} }
}, },

View file

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

6
static/robots.txt Normal file
View file

@ -0,0 +1,6 @@
user-agent: *
allow: /
allow: /about
allow: /event/*
allow: /announcement/*