Socket
Socket
Sign inDemoInstall

nuxt-seo

Package Overview
Dependencies
2
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.0 to 1.5.1

CHANGELOG.md

50

lib/module.js

@@ -150,4 +150,5 @@ const path = require('path')

metas = {...metas}
Object.keys(metas).map(k => {
const meta = {...metas[k]}
Object.keys(metas).forEach(k => {
const meta = {ids: false, ...metas[k]}
let metaIds
if (meta.fullId) {

@@ -193,3 +194,3 @@ meta.id = meta.fullId

return generate(meta, meta.value, meta.id + ':')
} else if (meta.content) {
} else {
findAndRemove(meta.id)

@@ -202,5 +203,7 @@

if (meta.ids) {
meta.ids.map(id => {
meta.id = id
metaIds = meta.ids || [meta.id]
metaIds.forEach(id => {
meta.id = id
if (meta.content) {
outputMeta.push({

@@ -213,38 +216,9 @@ hid: meta.id,

})
})
} else {
outputMeta.push({
hid: meta.id,
key: typeof index === 'number' ? `${meta.id}:0${index}` : meta.id,
property: meta.id,
name: meta.id,
content: meta.value
})
}
} else if (meta.id) {
if (meta.ids) {
meta.ids.map(id => {
findAndRemove(id)
meta.value = parserValue(meta.value)
if (!meta.value) {
return
}
} else {
outputMeta.push({
hid: id,
[id]: meta.value
})
})
} else {
findAndRemove(meta.id)
meta.value = parserValue(meta.value)
if (!meta.value) {
return
}
outputMeta.push({
[meta.id]: meta.value
})
}
})
}

@@ -251,0 +225,0 @@ })

@@ -0,0 +0,0 @@ const Vue = require('vue')

{
"name": "nuxt-seo",
"main": "lib/module.js",
"preferGlobal": false,
"version": "1.5.0",
"description": "SEO / HTML Meta Tags Module for Nuxt.js",
"author": {
"email": "TiagoDanin@outlook.com",
"name": "Tiago Danin",
"url": "https://TiagoDanin.github.io"
},
"license": "MIT",
"keywords": [
"html-meta",
"meta",
"nuxt",
"nuxt-module",
"nuxtjs",
"seo",
"seo-meta",
"seo-optimization",
"seo-plugin",
"social-media",
"vue",
"vuejs",
"canonical"
],
"scripts": {
"start": "nuxt example",
"test": "xo && ava"
},
"engines": {
"node": ">=12"
},
"private": false,
"repository": {
"type": "git",
"url": "git+https://github.com/TiagoDanin/Nuxt-SEO.git"
},
"homepage": "https://TiagoDanin.github.io/Nuxt-SEO",
"bugs": {
"url": "https://github.com/TiagoDanin/Nuxt-SEO/issues"
},
"github": {
"name": "Nuxt-SEO",
"owner": "TiagoDanin"
},
"files": [
"LICENSE",
"README.md",
"lib",
"package.json"
],
"dependencies": {
"debug": "^4.2.0"
},
"devDependencies": {
"ava": "^3.13.0",
"got": "^11.8.0",
"nuxt": "^2.14.7",
"vue": "^2.6.12",
"xo": "^0.34.2"
},
"xo": {
"ignores": [
"lib/plugin.js"
],
"rules": {
"quote-props": "warn",
"eqeqeq": "warn",
"array-callback-return": "warn",
"require-atomic-updates": "warn",
"no-else-return": "off",
"ava/no-ignored-test-files": "off"
},
"semicolon": false
},
"documentation": "./docs.md",
"ava": {
"files": [
"!test/fixtures/all.js"
]
},
"resolutions": {
"yargs-parser": "^20.2.4",
"kind-of": "^6.0.3"
},
"features": [
"Easy to use",
"Canonical tag automatically generated",
"Implementation of Open Graph Protocol (ogp)",
"Compatible with npm package: debug"
]
"name": "nuxt-seo",
"main": "lib/module.js",
"preferGlobal": false,
"version": "1.5.1",
"description": "SEO / HTML Meta Tags Module for NuxtJS",
"author": {
"email": "nick@frostbutter.com",
"name": "Nick Frostbutter",
"url": "https://frostbutter.com"
},
"license": "MIT",
"keywords": [
"html-meta",
"meta",
"nuxt",
"nuxt-module",
"nuxtjs",
"seo",
"seo-meta",
"seo-optimization",
"seo-plugin",
"social-media",
"vue",
"vuejs",
"canonical"
],
"scripts": {
"start": "nuxt example",
"test": "xo && ava"
},
"engines": {
"node": ">=v14.17.0"
},
"private": false,
"repository": {
"type": "git",
"url": "git+https://github.com/nickfrosty/nuxt-seo.git"
},
"homepage": "https://nuxt-seo.frostbutter.com",
"bugs": {
"url": "https://github.com/nickfrosty/nuxt-seo/issues"
},
"github": {
"name": "nuxt-seo",
"owner": "nickfrosty"
},
"files": [
"LICENSE",
"README.md",
"lib",
"package.json"
],
"dependencies": {
"debug": "^4.2.0"
},
"devDependencies": {
"ava": "^3.15.0",
"got": "^11.8.2",
"nuxt": "^2.15.6",
"vue": "^2.6.12",
"xo": "^0.40.1"
},
"xo": {
"ignores": [
"lib/plugin.js"
],
"rules": {
"quote-props": "warn",
"eqeqeq": "warn",
"array-callback-return": "warn",
"require-atomic-updates": "warn",
"no-else-return": "off",
"ava/no-ignored-test-files": "off"
},
"semicolon": false
},
"documentation": "https://nuxt-seo.frostbutter.com",
"ava": {
"files": [
"!test/fixtures/all.js"
]
},
"resolutions": {
"yargs-parser": "^20.2.7",
"kind-of": "^6.0.3"
},
"features": [
"Easy to use, on page SEO",
"Page title templating",
"Set default global SEO settings/tags",
"Customize all SEO options for each page",
"Canonical tag automatically generated",
"Supports the OpenGraph protocol",
"Twitter card support"
]
}

@@ -1,214 +0,32 @@

# Nuxt SEO
# nuxt-seo
[![Travis](https://img.shields.io/travis/TiagoDanin/Nuxt-SEO.svg?branch=master&style=flat-square)](https://travis-ci.org/TiagoDanin/Nuxt-SEO) [![Downloads](https://img.shields.io/npm/dt/nuxt-seo.svg?style=flat-square)](https://npmjs.org/package/nuxt-seo) [![Node](https://img.shields.io/node/v/nuxt-seo.svg?style=flat-square)](https://npmjs.org/package/nuxt-seo) [![Version](https://img.shields.io/npm/v/nuxt-seo.svg?style=flat-square)](https://npmjs.org/package/nuxt-seo) [![XO code style](https://img.shields.io/badge/code%20style-XO-red.svg?style=flat-square)](https://github.com/xojs/xo)
SEO / HTML meta tags module for NuxtJS
SEO / HTML Meta Tags Module for Nuxt.js
## Features
- Easy to use
- Easy to use, on page SEO
- Page title templating
- Set default global SEO settings/tags
- Customize all SEO options for each page
- Canonical tag automatically generated
- Implementation of Open Graph Protocol (ogp)
- Compatible with npm package: debug
- Supports the OpenGraph protocol
- Twitter card support
## Installation
[![@nickfrosty/nuxt-seo](/docs/static/preview.png)](https://nuxt-seo.frostbutter.com)
Module available through the [npm registry](https://www.npmjs.com/). It can be installed using the [`npm`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally) or [`yarn`](https://yarnpkg.com/en/) command line tool.
<p align="center">
<a href="https://nuxt-seo.frostbutter.com">Read Documentation</a>
</p>
```sh
# Yarn (Recomend)
yarn add nuxt-seo
# NPM
npm install nuxt-seo --save
```
[📖 **Release Notes**](./CHANGELOG.md)
## Documentation
## License
### Setup
[MIT](LICENSE) © [Nick Frostbutter](https://frostbutter.com)
- Add `nuxt-seo` to `modules` section of your `nuxt.config.js`
## Original credits
```js
{
modules: [
'nuxt-seo'
],
seo: {
// Module options
baseUrl: 'https://myWebSite',
name: '<name of site>',
title: '<title default>',
templateTitle: '%name% - %title%',
description: '<description default>'
//...
}
}
```
Original credits go to [TiagoDanin](https://github.com/TiagoDanin/Nuxt-SEO) for the "Nuxt-SEO" package. In [old issue #109](https://github.com/TiagoDanin/Nuxt-SEO/issues/109), the project was archived.
### Module options
#### `charset`
- Default: `utf-8`
- Type: String
### `baseUrl`
- Default: ``
- Type: String
#### `name`
- Default: `false`
- Type: String
#### `title`
- Default: `TITLE`
- Type: String
#### `description`
- Default: `false`
- Type: String
#### `keywords`
- Default: `[]`
- Type: Array[...keywords] || String
#### `lang`
- Default: `en`
- Type: String
#### `language`
- Default: `English`
- Type: String
#### `canonical`
The `auto` this will automatically generate according to the route, or put the route manually.
- Default: `auto`
- Type: String
#### `image`
- Default: `false`
- Type: URL String
### `author`
- Default: `false`
- Type: Array[name, email || site] || String
#### `openGraph[type]`
- Types: [ogp.me/#types](http://ogp.me/#types)
#### `url`
- Default: `false`
- Type: URL String
### `{...all}`
`charset`, `lang`, `language`, `copyright`, `name`, `subtitle`, `author`, `replyTo`, `description`, `keywords`, `url`, `noindex.ids.0`, `noindex.ids.1`, `noindex.ids`, `noindex.value.0`, `noindex.value.1`, `noindex.value`, `noindex`, `robots.ids.0`, `robots.ids.1`, `robots.ids`, `robots`, `openGraph.name`, `openGraph.title`, `openGraph.description`, `openGraph.locale`, `openGraph.url`, `openGraph.type`, `openGraph.profile.firstName`, `openGraph.profile.lastName`, `openGraph.profile.username`, `openGraph.profile.gender`, `openGraph.profile`, `openGraph.article.publishedTime`, `openGraph.article.modifiedTime`, `openGraph.article.expirationTime`, `openGraph.article.author.multi`, `openGraph.article.author`, `openGraph.article.section`, `openGraph.article.tag.multi`, `openGraph.article.tag`, `openGraph.article.authors.multi`, `openGraph.article.authors`, `openGraph.article.tags.multi`, `openGraph.article.tags`, `openGraph.article`, `openGraph.image.multi`, `openGraph.image.url`, `openGraph.image.width`, `openGraph.image.height`, `openGraph.image.alt`, `openGraph.image`, `openGraph.book.author.multi`, `openGraph.book.author`, `openGraph.book.isbn`, `openGraph.book.releaseDate`, `openGraph.book.tag.multi`, `openGraph.book.tag`, `openGraph.book.authors.multi`, `openGraph.book.authors`, `openGraph.book.tags.multi`, `openGraph.book.tags`, `openGraph.book`, `openGraph.price.currency`, `openGraph.price.amount`, `openGraph.price`, `openGraph.images.multi`, `openGraph.images.url`, `openGraph.images.width`, `openGraph.images.height`, `openGraph.images.alt`, `openGraph.images`, `openGraph`, `facebook.appId`, `facebook.pageId`, `facebook`, `twitter.title`, `twitter.description`, `twitter.card`, `twitter.type`, `twitter.site`, `twitter.creator`, `twitter`, `article.publishedTime`, `article.modifiedTime`, `article.expirationTime`, `article.author.multi`, `article.author`, `article.section`, `article.tag.multi`, `article.tag`, `article.authors.multi`, `article.authors`, `article.tags.multi`, `article.tags`, `article`, `book.author.multi`, `book.author`, `book.isbn`, `book.releaseDate`, `book.tag.multi`, `book.tag`, `book.authors.multi`, `book.authors`,
`book.tags.multi`, `book.tags`, `book`, `image.multi`, `image.url`, `image.width`, `image.height`, `image.alt`, `image`, `images.multi`, `images.url`, `images.width`, `images.height`, `images.alt`, `images`, `og.name`, `og.title`, `og.description`, `og.locale`, `og.url`, `og.type`, `og.profile.firstName`, `og.profile.lastName`, `og.profile.username`, `og.profile.gender`, `og.profile`, `og.article.publishedTime`, `og.article.modifiedTime`, `og.article.expirationTime`, `og.article.author.multi`, `og.article.author`, `og.article.section`, `og.article.tag.multi`, `og.article.tag`, `og.article.authors.multi`, `og.article.authors`, `og.article.tags.multi`, `og.article.tags`, `og.article`, `og.image.multi`, `og.image.url`, `og.image.width`, `og.image.height`, `og.image.alt`, `og.image`, `og.book.author.multi`, `og.book.author`, `og.book.isbn`, `og.book.releaseDate`, `og.book.tag.multi`, `og.book.tag`, `og.book.authors.multi`, `og.book.authors`, `og.book.tags.multi`, `og.book.tags`, `og.book`, `og.price.currency`, `og.price.amount`, `og.price`, `og.images.multi`, `og.images.url`, `og.images.width`, `og.images.height`, `og.images.alt`, `og.images`, `og`, `fb.appId`, `fb.pageId`, `fb`
### Nuxt Head Context
- `head: function({ $seo }) { $seo(options) }`
- `head: function() { this.$seo(options) }`
```vue
<template>
<h1>Hello World</h1>
</template>
<script>
export default {
head: function() {
return this.$seo({
name: 'Name app',
title: 'Home Page',
templateTitle: '%name% - %title%',
description: 'Hello World Page'
})
}
}
</script>
```
### Nuxt AsyncData Context
**NOTE:** Do not use in Server-Side Rendering (SSR) mode.
In SSR you should use the Nuxt Head Context.
- `asyncData: function({ seo }) { seo(options) }`
- `asyncData: function({ $seo }) { $seo(options) }`
- `asyncData: function() { this.seo(options) }`
- `asyncData: function() { this.$seo(options) }`
```vue
<template>
<h1>Hello World</h1>
</template>
<script>
export default {
asyncData: function(ctx) {
ctx.seo({
name: 'Name app',
title: 'Home Page',
templateTitle: '%name% - %title%',
description: 'Hello World Page'
})
}
}
</script>
```
## Tests
To run the test suite, first install the dependencies, then run `test`:
```sh
# Using Yarn
yarn test
```
## Dependency
<details>
<summary><a href="https://ghub.io/debug">debug</a>: small debugging utility</summary>
<b>Author</b>: TJ Holowaychuk</br>
<b>License</b>: MIT</br>
<b>Version</b>: ^4.2.0
</details>
## Dev Dependencies
<details>
<summary><a href="https://ghub.io/ava">ava</a>: Node.js test runner that lets you develop with confidence.</summary>
<b>Author</b>: novemberborn, sindresorhus, vdemedes</br>
<b>License</b>: MIT</br>
<b>Version</b>: ^3.12.1
</details>
<details>
<summary><a href="https://ghub.io/got">got</a>: Human-friendly and powerful HTTP request library for Node.js</summary>
<b>Author</b>: sindresorhus, szmarczak</br>
<b>License</b>: MIT</br>
<b>Version</b>: ^11.7.0
</details>
<details>
<summary><a href="https://ghub.io/nuxt">nuxt</a>: A minimalistic framework for server-rendered Vue.js applications (inspired by Next.js)</summary>
<b>Author</b>: atinux, pi0, clarkdo</br>
<b>License</b>: MIT</br>
<b>Version</b>: ^2.14.6
</details>
<details>
<summary><a href="https://ghub.io/vue">vue</a>: Reactive, component-oriented view layer for modern web interfaces.</summary>
<b>Author</b>: Evan You</br>
<b>License</b>: MIT</br>
<b>Version</b>: ^2.6.12
</details>
<details>
<summary><a href="https://ghub.io/xo">xo</a>: JavaScript/TypeScript linter with great defaults</summary>
<b>Author</b>: Sindre Sorhus</br>
<b>License</b>: MIT</br>
<b>Version</b>: ^0.33.1
</details>
## Contributors
Pull requests and stars are always welcome. For bugs and feature requests, please [create an issue](https://github.com/TiagoDanin/Nuxt-SEO/issues). [List of all contributors](https://github.com/TiagoDanin/Nuxt-SEO/graphs/contributors).
## License
[MIT](LICENSE) © [Tiago Danin](https://TiagoDanin.github.io)
Original License:
[MIT](https://github.com/TiagoDanin/Nuxt-SEO/blob/master/LICENSE) © [Tiago Danin](https://TiagoDanin.github.io)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc