Activities

bdrtsky

bdrtsky posted a new question

sitemap-module •

How to add lastmodISO with non-dynamic routes?

Docs covering mostly dynamic routes. I am using default settings, since I have siple website without API. So how do I add lastmodISO etc to sitemap then? It just list links by default.

bdrtsky

bdrtsky posted a new question

sitemap-module •

...

yutahaga

yutahaga posted a new bug report

sitemap-module •

bug Generation fails with --no-build option

Version

ceae48b1fc5566be1cdbe74e989ad4495968f8b5

Reproduction link

https://codesandbox.io/s/6118w7omwz

Steps to reproduce

Run yarn generate.

What is expected ?

Fix fatal error.

What is actually happening?

When I run nuxt generate --no-build, the following error occurs:

FATAL  Cannot read property 'get' of null

  at nuxt.hook (node_modules/@nuxtjs/sitemap/src/index.js:60:32)
  at utils.sequence.fn (node_modules/@nuxt/core/dist/core.js:436:53)
  at promise.then (node_modules/@nuxt/utils/dist/utils.js:1664:43)

Additional comments?

router.extendRoutes are ignored when with --no-build option, so no cache is generated.

vedees

vedees posted a new question

sitemap-module •

How to use this map data with Dynamic routes?

My code:

 return axios.all([
     axios.get('https://jsonplaceholder.typicode.com/users'),
     axios.get('https://jsonplaceholder.typicode.com/ico')
 ])
 .then(axios.spread((users, ico) => [...users.data, ...ico.data]))

How to use this?

 {
         url: '/page/2',
         changefreq: 'daily',
         priority: 1,
         lastmodISO: '2017-06-30T13:30:00.000Z'
 }


With Dynamic routes? Right now it's assigning only url.

derevandal

derevandal posted a new feature request

sitemap-module •

idea Feature request: add last modification date

What problem does this feature solve?

Adding <lastmod>2019-01-23</lastmod> in a url tag, search engines will know how this content changed and when it was added and improve the pagerank.

What does the proposed changes look like?

I suggest to use fs.stat(path, [callback]) to read mtime stat of .vue's file or .md's (I wanna use to a blog system, so, it be helpfull this support) and write in sitemap.xml

juloxrox

juloxrox posted a new bug report

sitemap-module •

bug 404 not found with firebase cloud functions

Version

0.2.0

Reproduction link

https://github.com/juloxrox/testsitemap

Steps to reproduce

Hi everyone,
When I do yarn dev or yarn build + yarn start I got sitemap.xml correctly generated when I visit /sitemap.xml.
But when it is served with firebase cloud functions, I get 404 not found. Don't know if it is firebase/nuxt/module related or am I missing something ?

I hosted an exemple here : https://github.com/juloxrox/testsitemap

Does someone has a solution for that please?
Thanks in advance

What is expected ?

200 Response for /sitemap.xml

What is actually happening?

404 not found

iggyvanlith

iggyvanlith posted a new question

sitemap-module •

Error on generating sitemap on staging & production

I'm experiencing a problem in generating the sitemap. Everything works fine on localhost and the sitemap is generated properly but when I deploy my code to Heroku it stops working and I get this error (both on staging and production):

ERROR  Cannot read property 'get' of null
at handler (node_modules/@nuxtjs/sitemap/src/index.js:117:13)
at call (node_modules/connect/index.js:239:7)
at next (node_modules/connect/index.js:183:5)
at next (node_modules/connect/index.js:161:14)
at SendStream.error (node_modules/serve-static/index.js:121:7)
at SendStream.emit (events.js:182:13)
at SendStream.EventEmitter.emit (domain.js:442:20)
at SendStream.error (node_modules/send/index.js:270:17)
at SendStream.onStatError (node_modules/send/index.js:421:12)
at onstat (node_modules/send/index.js:727:26)
at FSReqWrap.oncomplete (fs.js:152:21)

So this would be in this file: https://github.com/nuxt-community/sitemap-module/blob/dev/src/index.js. And I guess it has something to do with the cache not being created?

I've removed all the settings and custom routes from the module so it's just included with this piece now:

modules: [
   ...more modules...
   ['@nuxtjs/sitemap'],
   ...more modules...
]

I've tried reproducing this error with a blank nuxt installation with just this module deploying to heroku but with no success (as in, a sitemap is properly generated). The problem is probably somewhere in my codebase but I'm not sure where to start looking.

Any idea where I should start to solve this error?

agjini

agjini posted a new question

sitemap-module •

Access to nuxt context inside routes generation function

What i try achieve is to generate dynamic routes in the sitemap using data contained in the vuex store.

But I'm not able to access to any variable in the context as $store.

Is there any chance to get this working ? Or a plan to add access to the nuxt context as a parameter of the 'routes' option in nuxt-sitemap ?

Thanks in advance

alfonsobries

alfonsobries posted a new feature request

sitemap-module •

idea Add localization to the sitemap.xml

What problem does this feature solve?

Currently, it's not possible to add localization to a sitemap.xml in a multilingual site accordingly to the Google recommendations

https://support.google.com/webmasters/answer/189077

What does the proposed changes look like?

The possibility to generate sitemaps like this:

```
<url>
    <loc>http://www.example.com/english/page.html</loc>
    <xhtml:link 
               rel="alternate"
               hreflang="de"
               href="http://www.example.com/deutsch/page.html"/>
    <xhtml:link 
               rel="alternate"
               hreflang="de-ch"
               href="http://www.example.com/schweiz-deutsch/page.html"/>
    <xhtml:link 
               rel="alternate"
               hreflang="en"
               href="http://www.example.com/english/page.html"/>
  </url>
alfonsobries

alfonsobries posted a new question

sitemap-module •

Feature request: Add localization to the sitemap

Currently it's not possible to add localization to a sitemap.xml accordingly to the google recommendations

https://support.google.com/webmasters/answer/189077

<url>
    <loc>http://www.example.com/english/page.html</loc>
    <xhtml:link 
               rel="alternate"
               hreflang="de"
               href="http://www.example.com/deutsch/page.html"/>
    <xhtml:link 
               rel="alternate"
               hreflang="de-ch"
               href="http://www.example.com/schweiz-deutsch/page.html"/>
    <xhtml:link 
               rel="alternate"
               hreflang="en"
               href="http://www.example.com/english/page.html"/>
  </url>
yuanwei92

yuanwei92 posted a new question

sitemap-module •

Sitemap could not be found after deployment to Firebase functions

Hi, the sitemap module works perfectly in local production build. However after I deployed it to Firebase functions, the page could not be found. I wonder what could be the issue? The dist files were hosted on Firebase hosting.

nuxt.config.js

sitemap: {
  hostname: 'https://shopsavee.com',
  routes: []
},
build: {
  publicPath: '/',
  vendor: ['babel-polyfill'],
  extractCSS: true,
  babel: {
    presets: [['@babel/preset-env']],
    plugins: [
      '@babel/plugin-transform-runtime',
      '@babel/plugin-syntax-dynamic-import'
    ]
  },
}
egidioFrat

egidioFrat posted a new feature request

sitemap-module •

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 •

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 •

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 •

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 •

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 •

What about alternate language pages?
temi4

temi4 posted a new question

sitemap-module •

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 •

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 •

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