Skip to content

Commit

Permalink
Adds i18n SEO information to page headers
Browse files Browse the repository at this point in the history
Related to Issue #25
  • Loading branch information
BobChao87 committed Jul 27, 2021
1 parent e373dd0 commit 817f619
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@

<script lang="ts">
import Vue from 'vue';
import { MetaInfo } from 'vue-meta';
export default Vue.extend({
head(): Required<Pick<MetaInfo, "htmlAttrs" | "link" | "meta">> {
return this.$nuxtI18nHead({ addSeoAttributes: true });
},
mounted(): void {
// Provide calls to this.$gtag here to update Analytics
},
Expand Down
2 changes: 2 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ export default {
langDir: '~/locales/',
lazy: true,
vueI18n: '~/vue-i18n.config.js',
// Performant language-based SEO: https://i18n.nuxtjs.org/seo#improving-performance
seo: false,
},

// SSR Cache configuration: https://www.npmjs.com/package/nuxt-ssr-cache
Expand Down

0 comments on commit 817f619

Please sign in to comment.