@nuxtjs/sitemap
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [2.3.1](https://github.com/nuxt-community/sitemap-module/compare/v2.3.0...v2.3.1) (2020-06-04) | ||
### Bug Fixes | ||
* set hreflang with iso value like nuxt-i18n ([959fa82](https://github.com/nuxt-community/sitemap-module/commit/959fa82efe86cbba0bda737fe666592bf25f4533)), closes [#131](https://github.com/nuxt-community/sitemap-module/issues/131) | ||
## [2.3.0](https://github.com/nuxt-community/sitemap-module/compare/v2.2.1...v2.3.0) (2020-05-11) | ||
@@ -7,0 +14,0 @@ |
@@ -49,3 +49,3 @@ const { hostname } = require('os') | ||
if (options.i18n) { | ||
const { defaultLocale, routesNameSeparator } = options.i18n | ||
const { defaultLocale, locales, routesNameSeparator } = options.i18n | ||
@@ -78,4 +78,6 @@ // Set alternate routes for each page | ||
} | ||
const locale = locales.find(({ code }) => code === lang) || { iso: lang } | ||
i18nRoute.links.push({ | ||
lang, | ||
lang: locale.iso, | ||
url: route.url, | ||
@@ -82,0 +84,0 @@ }) |
@@ -61,2 +61,3 @@ const MODULE_NAME = require('../package.json').name | ||
defaultLocale: '', | ||
locales: [], | ||
routesNameSeparator: '___', | ||
@@ -63,0 +64,0 @@ ...sitemapOptions.i18n, |
{ | ||
"name": "@nuxtjs/sitemap", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Automatically generate or serve dynamic sitemap.xml for Nuxt.js projects", | ||
@@ -54,7 +54,7 @@ "keywords": [ | ||
"async-cache": "^1.1.0", | ||
"consola": "^2.12.1", | ||
"consola": "^2.12.2", | ||
"etag": "^1.8.1", | ||
"fresh": "^0.5.2", | ||
"fs-extra": "^8.1.0", | ||
"is-https": "^1.0.0", | ||
"is-https": "^2.0.2", | ||
"lodash.unionby": "^4.8.0", | ||
@@ -61,0 +61,0 @@ "minimatch": "^3.0.4", |
@@ -5,3 +5,3 @@ # Sitemap Module | ||
[![Downloads](https://img.shields.io/npm/dw/@nuxtjs/sitemap?style=flat-square)](https://npmjs.com/package/@nuxtjs/sitemap) | ||
[![Build Status](https://img.shields.io/circleci/project/github/nuxt-community/sitemap-module?style=flat-square)](https://circleci.com/gh/nuxt-community/sitemap-module) | ||
[![Build Status](https://img.shields.io/circleci/project/github/nuxt-community/sitemap-module?style=flat-square)](https://app.circleci.com/pipelines/github/nuxt-community/sitemap-module) | ||
[![Coverage Status](https://img.shields.io/codecov/c/github/nuxt-community/sitemap-module?style=flat-square)](https://codecov.io/gh/nuxt-community/sitemap-module) | ||
@@ -243,7 +243,10 @@ [![License](https://img.shields.io/npm/l/@nuxtjs/sitemap?style=flat-square)](http://standardjs.com) | ||
1. `sitemap.hostname` value from your `nuxt.config.js` | ||
2. [`build.publicPath`](https://nuxtjs.org/api/configuration-build/#publicpath) value from your `nuxt.config.js` | ||
3. [`os.hostname()`](https://nodejs.org/api/os.html#os_os_hostname) for **generate** or **spa** mode, or dynamically based on request URL (`headers.host`) for **ssr** mode | ||
2. [`build.publicPath`](https://nuxtjs.org/api/configuration-build/#publicpath) value from your `nuxt.config.js` (⚠️ **deprecated**) | ||
3. [`os.hostname()`](https://nodejs.org/api/os.html#os_os_hostname) in **generate** or **spa** mode, or dynamically based on request URL (`headers.host`) in **ssr** mode | ||
This value is **mandatory** for generation sitemap file, and you should explicitly provide it for **generate** or **spa** mode. | ||
This value is **mandatory** for generation sitemap file, and you should explicitly provide it in **generate** or **spa** mode. | ||
⚠️ The usage of `build.publicPath` as default value is deprecated and will be removed on release v3.0. | ||
To disable it on the current release, set a falsy value (eg. `hostname: false`). | ||
### `cacheTime` (optional) - number | ||
@@ -253,7 +256,7 @@ | ||
Defines how frequently should sitemap **routes** being updated (value in milliseconds). | ||
Defines how frequently sitemap **routes** should be updated (value in milliseconds). | ||
Please note that after each invalidation, `routes` will be evaluated again (see [routes declaration](#routes-declaration) section). | ||
This option is enable only for the nuxt **ssr** mode. | ||
This option is only available in **ssr** mode. | ||
@@ -268,3 +271,3 @@ ### `etag` (optional) - object | ||
This option is enable only for the nuxt **ssr** mode. | ||
This option is only available in **ssr** mode. | ||
@@ -380,2 +383,3 @@ ### `exclude` (optional) - string array | ||
defaultLocale: 'en', | ||
locales: ['en', 'es', 'fr'], | ||
routesNameSeparator: '___' | ||
@@ -504,3 +508,3 @@ } | ||
This option is enable only for the nuxt **ssr** mode. | ||
This option is only available in **ssr** mode. | ||
@@ -507,0 +511,0 @@ ### `gzip` (optional) - boolean |
50984
740
590
12
+ Addedis-https@2.0.2(transitive)
- Removedis-https@1.0.0(transitive)
Updatedconsola@^2.12.2
Updatedis-https@^2.0.2