Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/littlegiants/nuxt-canonical
Module for automatically generating canonical tags for all pages in your nuxt project.
https://github.com/littlegiants/nuxt-canonical
Last synced: 12 days ago
JSON representation
Module for automatically generating canonical tags for all pages in your nuxt project.
- Host: GitHub
- URL: https://github.com/littlegiants/nuxt-canonical
- Owner: littlegiants
- License: gpl-3.0
- Created: 2019-11-29T13:35:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-07T10:07:08.000Z (over 1 year ago)
- Last Synced: 2024-09-18T18:51:43.958Z (about 2 months ago)
- Language: JavaScript
- Size: 37.1 KB
- Stars: 19
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```javascript
...modules: [
['nuxt-canonical', { baseUrl: 'https://my-non-www-base-url.io' }],
]```
This will result in the following tag being inserted into all generated pages:
```html
```
## Options
Available options besides the required baseUrl
```javascript
{
trailingSlashes: true, // Adds trailing slashes to the href attribute urls, defaults to true
forceLowercase: false // Forces lowercase href attribute urls, defaults to false
}
```