SEO / HTML Meta Tags Module for Nuxt.js
Module available through the
npm registry. It can be installed using the
npm
or
yarn
command line tools.
# NPM
npm install nuxt-seo --save
# Or Using Yarn
yarn add nuxt-seo
- Add
nuxt-seo
tomodules
section of yournuxt.config.js
{
modules: [
'nuxt-seo'
],
seo: {
// Module options
name: '<name of site>',
title: '<title default>',
description: '<description default'
//...
}
}
- Default:
false
- Type: String
- Default:
utf-8
- Type: String
- Default:
TITLE
- Type: String
- Default:
en
- Type: String
- Default:
English
- Type: String
- Default:
false
- Type: URL String
- Default:
false
- Type: String
- Default:
[]
- Type: Array[...keywords] || String
- Default:
false
- Types: ogp.me/#types
- Default:
false
- Type: Array[name, email || site] || String
- Default:
false
- Type: URL String
asyncData: function({ seo }) { seo(options) }
<template>
<h1>Hello World</h1>
</template>
<script>
export default {
asyncData: function(ctx) {
ctx.seo({
title: 'Home Page',
description: 'Hello World Page'
})
},
head: {
//title: 'Home Page'
}
}
</script>
To run the test suite, first install the dependencies, then run test
:
# NPM
npm test
# Or Using Yarn
yarn test
- debug: small debugging utility
- ava: Testing can be a drag. AVA helps you get it done.
- nuxt: A minimalistic framework for server-rendered Vue.js applications (inspired by Next.js)
- vue: Reactive, component-oriented view layer for modern web interfaces.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. List of all contributors.