Repository sitemap-module

egidioFrat

egidioFrat posted a new feature request

sitemap-module • 6 days ago

idea An option for trailing slash would improve SEO

What problem does this feature solve?

Missing trailing slash on URL of a directory force github pages to redirect HTTPS to HTTP.
https://github.com/isaacs/github/issues/289

What does the proposed changes look like?

It could be an option to add trailing slash to static URL in sitemap.xml

SnirShechter

SnirShechter posted a new feature request

sitemap-module • 21 days ago

idea Support Localized sitemaps (using nuxt-i18n)

What problem does this feature solve?

There is no way of automatically generating a sitemap when the site is localized (using nuxt-i18n, for example).

Two difficulties when using the sitemap module with the nuxt-i18n localization:

  1. Prefixes ('/en').
  2. Url localization (/en/shop becomes /fr/boutique or so).

What does the proposed changes look like?

I suggest (if in any way possible) to generate the static pages using the router routes after they were already generated by the nuxt-i18n module.

KevinFuret

KevinFuret posted a new question

sitemap-module • a month ago

How map routes for differents content types ?

Hello,
I'm wondering how make 4 axios call inside the route function of sitemap to generate all the route of my 4 content types.
Thanks a lot

JanuszOsica

JanuszOsica posted a new question

sitemap-module • a month ago

How to use this module?

Hi,
sitemap shouldn't generate on nuxt generate but only on nuxt build. Is it ok?

OlegLevitskiy

OlegLevitskiy posted a new question

sitemap-module • 4 months ago

What about alternate language pages?

How to add a multi-language to the sitemap configuration?

links: [
 { lang: 'en', url: 'http://test.com/page-1/', },
 { lang: 'ja', url: 'http://test.com/page-1/ja/', }
]
OlegLevitskiy

OlegLevitskiy posted a new question

sitemap-module • 4 months ago

What about alternate language pages?
temi4

temi4 posted a new question

sitemap-module • 4 months ago

Large sitemap

Hello.

1) Sitemaps should be no larger than 50MB (52,428,800 bytes) and can contain a maximum of 50,000 URLs
If I have more links or more size. How do I add a pagination?

2) May be do sitemap with section?
Repo: https://github.com/litchfield/django-fastsitemaps
Example:

scottsweb

scottsweb posted a new bug report

sitemap-module • 6 months ago

bug Double run on generate

Version

0.1.1

Reproduction link

https://github.com/nuxt-community/sitemap-module

Steps to reproduce

Create a new routes section in your nuxt.config.js file with a console.log statement like so:

  sitemap: {
    path: '/sitemap.xml',
    cacheTime: 1000 * 60 * 15,
    generate: true, 
    gzip: true,
    async routes() {
        console.log( '....routes()' )
                ...

What is expected ?

Only one log is output during generate.

What is actually happening?

Multiple log entries are output:

nuxt:generate Generating... +0ms ....routes() nuxt: Call build:before hooks (3) +0ms nuxt:pwa Adding icons +0ms nuxt:pwa Adding manifest +0ms nuxt:pwa Adding meta +0ms nuxt:build Generating files... +4ms nuxt:build Generating routes... +8ms ....routes()

Additional comments?

This is an issue because with a dynamically generated set of routes, the API gets hit twice for every request (as far as I can tell).

Using 1.4.0 of nuxt.

wolle404

wolle404 posted a new question

sitemap-module • 6 months ago

Generate dynamic sitemap with axios-module ($axios)

Hey there,

is there a way that I can use the nuxt axios client here instead of the normal axios client?

https://github.com/nuxt-community/axios-module

ekoeryanto

ekoeryanto posted a new question

sitemap-module • 6 months ago

weird code generated on netlify

weird code generated to sitemap.xml in netlify cms.
but none such code generated on local

{ const open = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function (method, url) { open.apply(this, arguments); this.addEventListener('readystatechange', function _() { if(this.readyState == this.HEADERS_RECEIVED) { const contentType = this.getResponseHeader('Content-Type') || ''; if (contentType.startsWith('video/') || contentType.startsWith('audio/')) { window.postMessage({ source: 'xmlhttprequest-open', url, mime: contentType, method, contentType }, '*'); } this.removeEventListener('readystatechange', _); } }) } }

dimitrieh

dimitrieh posted a new question

sitemap-module • 6 months ago

RSS support?

I found https://github.com/yashha/rss-module but I am unsure how it works. It seems to be a fork of this repository. Can this also work with static generated websites?

I would appreciate any help implementing an rss feed for static nuxt websites 😉

HADB

HADB posted a new question

sitemap-module • 7 months ago

npm version is not updated

The latest version on npm is 0.0.3 not 0.0.4.

HADB

HADB posted a new question

sitemap-module • 7 months ago

npm version is not updated

The latest version on npm is 0.0.3 not the latest 0.0.4.

dohomi

dohomi posted a new question

sitemap-module • 7 months ago

errors on npm install trying to make a PR

Hi @NicoPennec

thanks for your module. I tried to fork it for applying a PR but unfortunately after forking and trying to run npm install and npm run test nothing works.

```
nuxt-module: Starting build +0ms
nuxt-module:build Building +0ms
nuxt-module:build Done +627ms

@nuxtjs/[email protected] lint /data/vuejs/sitemap-module
eslint lib src test

console.error node_modules/nuxt/lib/common/utils.js:22

 ERROR  Nuxt error

  TypeError: Cannot read property 'length' of undefined

`` It would be great if you could pass thereqof the server to theroutes` promise based function. This is what I tried to do with my PR because in my setup I have a multilang setup and would like to serve the right language inside the server middleware.
Thanks

yangchendoit

yangchendoit posted a new bug report

sitemap-module • 7 months ago

bug regeneratorRuntime is not defined

image
image

when i go back to 0.0.3, the problem fixed.

jerakode

jerakode posted a new feature request

sitemap-module • 7 months ago

idea Multiple sitemaps possible?

Hello. Is it possible to create separate multiple sitemaps?
I want separate sitemap for Google News.

crabdul

crabdul posted a new question

sitemap-module • 7 months ago

sitemap.xml not generating

The sitemap is not running when I run the build command.

Below is the configuration for modules and sitemap.
I am importing axios at the start of the nuxt.config.js file

  modules: ['@nuxtjs/sitemap'],
  sitemap: {
    hostname: 'https://karaimusic.com',
    routes () {
      return axios.get('https://karaimusic.co.uk/wp-json/wp/v2/posts?categories=2')
        .then(res => res.data.map(track => {
          const path = '/tracks/' + track.slug
          console.log(path)
          return path
        }))
    }
  }

Axios is getting the data properly because I'm able to print out the slugs of my posts properly

/tracks/parquet-courts-almost-had-to-start-a-fight-in-and-out-of-patience
/tracks/iceage-catch-it

Where am I going wrong?
What else can I check?

rizkiheryandi

rizkiheryandi posted a new question

sitemap-module • 8 months ago

How to create .xml.gz sitemap index ?

I have web app with lots of URL of single product (let's say it's a e-commerce website).

Let's say i have 60.000 url to save in my sitemap, and i separate that with 2 sitemap.

And each sitemap i wanna compress it with .xml.gz format, to reduce its size.

I can easily do that with PHP (i used laravel), but how to do that with NuxtJs ? (even a pure javascript besides the NuxtJs)

Can someone help me ?

Thank you :)

delucis

delucis posted a new feature request

sitemap-module • 8 months ago

idea Options for static routes

Hi, thanks for your work on this module!

When passing dynamic routes, setting extra options is possible, e.g.

routes: [
  { url: '/dynamic/1', changefreq: 'daily', priority: 1 /* etc. */ }
]

But for “static” routes, there doesn’t seem to be any way to pass such options.

If I add a static route to the routes option, it gets duplicated because static and dynamic routes are merged using lodash’s union(). It ends up comparing, e.g. '/route' with { url: '/route', changefreq: 'daily' }, which aren’t equal so both are included.

Is there a solution? If not, perhaps the following might make sense:

  1. Improve the merge strategy in the createCache() method to avoid such duplicates. This would allow overriding static routes by adding them to the routes option.

  2. Allow for a default set of route options to be set, which are applied to static routes (or all routes?)

// maybe something like this?
sitemap: {
  routeDefaults: {
    changefreq: 'daily'
  },
  routes: [ '/foo', '/bar' ]
}
// would be equivalent to, with routeDefaults also applying to static routes
sitemap: {
  routes: [
    { url: '/foo', changefreq: 'daily' },
    { url: '/bar', changefreq: 'daily' }
  ]
}

Any thoughts? I might have misread index.js, so maybe another solution would be better. Would be happy to work on a solution if there’s interest.

leandromatos

leandromatos posted a new question

sitemap-module • 9 months ago

Internationalized routes are not being generated

Does this module not generate the sitemap for internationalized routes?

I used the following example to start a project, but the site map does not generate the routes for the pages that are within pages/_lang/.

https://nuxtjs.org/examples/i18n/

How can I do to generate the routes of these pages dynamically?