Activities

maxnik1994

maxnik1994 posted a new question

sitemap-module •

Incorrect generation of routes

Hey. There was an incomprehensible situation when using the @ nuxtjs / sitemap package.
When generating a system map file, the static paths were displayed incorrectly (without a domain name). Wrong old women: https://about/, https://contact/, https://news/, https://test/.Tell me how to solve the problem. Thank.
Снимок333

maxnik1994

maxnik1994 posted a new question

sitemap-module •

Incorrect generation of routes

Hey. There was an incomprehensible situation when using the @ nuxtjs / sitemap package.
When generating a system map file, the static paths were displayed incorrectly (without a domain name). Wrong old women: https://about/, https://contact/, https://news/, https://test/.Tell me how to solve the problem. Thank.
Снимок333.PNG

starikovm

starikovm posted a new feature request

sitemap-module •

idea Force https urls

What problem does this feature solve?

I have a website running on https on heroku, so https request via CNAME goes to herou and website is hosted there.
What am I experiencing now is that isHTTPS(req) function on production is returning false for these kind of requests, probably because of current hosting architecture.

I wanted to raise a PR with an option for forced https links in sitemap to avoid such issues and such situations.

What does the proposed changes look like?

Option in sitemaps module like forceHTTPS, which then creates all links with https reagrdless of request type and so on.

liyasthomas

liyasthomas posted a new bug report

sitemap-module •

bug sitemap.xml generated in Travis CI build have routes relative to Travis CI build job and not actual routes.

Version

2.0

Reproduction link

https://postwoman.io/sitemap.xml

Steps to reproduce

  1. Build nuxt application in Travis CI
  2. Deploy the application
  3. Find the /sitemap.xml generated
  4. Routes are relative to CI build job and not actual routes

What is expected ?

Routes should be relative to base path and not relative to build environment.

What is actually happening?

Instead of base path, build environment is considered as the root and /pages/routes are set relative to build enironment

mornir

mornir posted a new question

sitemap-module •

Cache Invalidation

Hi!
Does the cached sitemap gets invalidated every time my website is rebuild with nuxt generate?
If yes, what would be the recommended value for the cacheTime property? Disabling it with the value 0 or setting to a long period?

And thanks for this useful module!

BobDempsey

BobDempsey resolved the question #c66

sitemap-module •

/sitemap.xml not rendering on live website

Hey you can delete this if needed. It worked when I deployed the entire nuxt project to my host. Thank you though!

BobDempsey

BobDempsey posted a new question

sitemap-module •

/sitemap.xml not rendering on live website

Hey I'm having difficulties with getting the actual sitemap page to display on my live website. It works just fine using run && build.

Any help much appreciated! I've tried both sitemap configs.

nuxt.config.js

modules:["@nuxtjs/sitemap"],

sitemap: {
hostname: "https://silentauctionvacations.com",
path: "/sitemap.xml",
exclude: ["/admin/**"]
}

OR

sitemap: {
exclude: ["/admin/**"]
}

adfdev

adfdev posted a new question

sitemap-module •

Nuxt.js Internal Server Error

Have this settings for sitemap:

  sitemap: {
    routes: [
      "/",
      "/en"
    ],
    path: '/sitemap.xml',
  },

in dev mode and in production mode (npm start) can see /sitemap.xml, but when deploy have this error:

Nuxt.js Internal Server Error

connecteev

connecteev posted a new question

sitemap-module •

Support sitemap creation for sites with large (hundreds of thousands) of URLs from a database

Sitemap files are limited to 50K URLs each.

  1. Does this package support sitemap creation for sites with large (hundreds of thousands) of URLs?
  2. How can I pass data from the database into this sitemap module? Is there an example of how to do this?
sonofmagic

sonofmagic posted a new feature request

sitemap-module •

idea Support sitemap Etag Header

What problem does this feature solve?

Sitemap with Rtag can speed up search engine crawling. Baidu search engine can respond to sitemap updates more quickly. refer:https://ziyuan.baidu.com/college/articleinfo?id=456

What does the proposed changes look like?

options:{
Etag:true
}

PTiCA1

PTiCA1 posted a new feature request

sitemap-module •

idea Auto creating sitemap and index files from one large list?

What problem does this feature solve?

Hello to everybody,
does anyone have a solution to solve sitemap generation for a large number of pages? I generate articles from wordpress rest api and I need to split the sitemap into more files.

There is a solution in the sitemap.js documentation but I don't know how to use it in nuxt.js
https://github.com/ekalinin/sitemap.js#building-just-the-sitemap-index-file

Thanks for any advice.

michelsteege

michelsteege posted a new question

sitemap-module •

Request in routes function

I have a project where i generate a sitemap based on the current domain, to do this is need the hostname in the routes function to send it to an api which returns all info needed for my dynamic routes.
Is there any way to get the hostname/current domain in the routes function?

manniL

manniL posted a new feature request

sitemap-module •

idea Option to add trailing slash to routes, especially static ones

What problem does this feature solve?

We can already add a trailing slash to our own defined routes, but there is no way (AFAIK) yet to add it to generated/static routes.

e.g.
/about -> /about/ (while there is a pages/about.vue)

ianfortier

ianfortier posted a new question

sitemap-module •

Load and merge external sitemap.xml

Is it possible to load an external site map and merge it with the one generated by the plugin?

eg: yyy.com/sitemap.xml

The items are loaded from this remote sitemap are merged with the one generated by the plugin.

Thanks

Aylay

Aylay posted a new feature request

sitemap-module •

idea The property exclude VS generate:route priority

What problem does this feature solve?

Hi all ;)

In my nuxt file, I have an array of URL in generate:routes which contain multiple url and my 404 URL.
Also, I put this same 404 URL in the array of sitemap:exclude.

But, the 404 URL is always in my sitemap.xml.

Is it possible to force the exclude property of the generate sitemap property ?

Thanks

What does the proposed changes look like?

If any URL is in the exclude property and the generate:routes property, keep removing the URL in the exclude property

jhd4tmr

jhd4tmr posted a new question

sitemap-module •

How to create several sitemaps to separate the routers?

I have a site with more than 50,000 uris, i want to separate the sitemap.xml to several small parts.

thisischrisj

thisischrisj posted a new question

sitemap-module •

Access the routes object inside the routes function

The filter function passes the routes object to the function call. Is it possible to access that same object from within the routes function call?

We have nuxt.js frontend that pulls data from a WordPress backend. To generate the sitemap we are pulling all the permalink structures from Wordpress inside the routes function:

...
  routes () {
    var endpoint = 'https://xxxx.yyyy/permalinks';
    return axios.get(endpoint)
    .then(res => res.data.map(page => page.permalink))
    .catch((err) => {  });
  }
...

The problem is that the permalinks we get back from WordPress are not necessarily aligned 1-to-1 with the nuxt routes. The ones that aren't can be removed as they are not needed.

What we'd like to do is get all the data from the endpoint and test each page.permalink against the structure of the nuxt routes. If the permalink matches a valid route then include it, otherwise, omit it.

So, imagine we have the following route structures:

blog/:id
news/:id

And the call to the endpoint returns:

[
    { permalink: 'blog/123' },
    { permalink: 'news/123' },
    { permalink: 'case-studies/123' }
}

We want to filter the endpoint results so that 'case-studies/123' is omitted from the sitemap because it is not a valid route.

SnirShechter

SnirShechter posted a new feature request

sitemap-module •

idea Exclude pages from sitemap via in-component options

What problem does this feature solve?

excluding pages via filter function and/or exclude globs is fine for a global configuration.

That being said, sometimes we would like the configuration to be related to the page itself (i.e a terms & conditions page that is duplicated across projects).

What does the proposed changes look like?

Terms.vue

<template>
...
</template>
<script>
export default {
      sitemap:false
}
</script>
<style>
...
</style>

A pull request is available in #70

miteyema

miteyema posted a new question

sitemap-module •

using both filter and defaults does not work when following README.md

If you blindly copy the code from the documentation for both filter (to have trailing slashes) and defaults (to set default values for all routes), the sitemap.xml has URLs with trailing slashes, but the URLs do not have the default values. This is because the map function used in the code example for filter to have trailing slashes, throws away everything but the URL. Changing the documentation would prevent other people having the same issue if they would blindly copy/paste the code from the documentation.

SnirShechter

SnirShechter posted a new feature request

sitemap-module •

idea Filter function should receive the full route object (instead of just the url)

What problem does this feature solve?

The filter function receives an array of routes containing URLs and sitemap options. This means that the only way to filter the route is by final URL:

filter function - received route object

{
      url:'/about-us',
      // ...sitemapOptions
}

The specific need rises when we are using nuxt-i18n:

localed route

routeName: 'about'
urls:{
      en: '/about-us', 
      fr: '/a-propos',
      es: '/sobre' 
}

If I wish to exclude these routes, I need to use one of two options:

sitemapConfig - exclude 'about'

exclude: [
      '/about-us', 
      '/a-propos',
      '/sobre'
]

or

filter function - exclude 'about'

filter(routes){
      const excludedRoutes =  ['/about-us', '/a-propos', '/sobre']
      return routes.filter(route=>!excludedRoutes.includes(route.url))
}

What does the proposed changes look like?

The route object can actually contain more data:

filter function - possible route object

{
      url:'/about-us',
      name:'about',
      path:'/',
      chunkName:'pages/index',
      component:'C:\dev\sitemap-module\test\fixture\pages\about.vue'
}

Using that data, we can easily exclude routes by name.

filter function - new form

filter(routes){
      const excludedRouteNames =  ['about']
      return routes.filter(route=>!excludedRouteNames .includes(route.name))
}