1.0.6 • Published 3 years ago

nuxt-canonical v1.0.6

Weekly downloads
277
License
GPL-3.0-or-later
Repository
github
Last release
3 years ago

nuxt-canonical

This package allows you to have canonicaltags automatically generated when generating static sites with nuxt. This helps you avoid SEO crawlers marking your non-www urls as duplicates, by telling them which of the two base urls is the "correct" one.

Usage

nuxt.config.js

...

modules: [
    ['nuxt-canonical', { baseUrl: 'https://my-non-www-base-url.io' }],
]

This will result in the following tag being inserted into all generated pages:

<link rel="canonical" href="https://my-non-www-base-url.io/{{pageName}}" />

Options

Available options besides the required baseUrl

{
  trailingSlashes: true, // Adds trailing slashes to the href attribute urls, defaults to true
  forceLowercase: false // Forces lowercase href attribute urls, defaults to false
}
1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago