Joshua
Joshua
Explore posts from servers
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Yeah I really do think there’s an oddity with the module
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Yeah looks right, if urls.ts has what I sent.
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
kk cool
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
if you just return url strings you may need to do some transforming
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
the data coming back from my endpoint is already formatted for a sitemap though keep in mind
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
yes
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Basically just a wrapper makes it work for some reason.
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
sources: [
'/api/__sitemap__/urls'
],
sources: [
'/api/__sitemap__/urls'
],
I changed my nuxt.config.ts to have this as the source, and then inside that file:
export default defineSitemapEventHandler(async () => {
try {
const response = await fetch('https://backend.api.url/urls');
const data = await response.json();

if (Array.isArray(data)) {
return data;
} else {
console.error('Unexpected data format from api.mcmodels.net/urls');
return [];
}
} catch (error) {
console.error('Error fetching sitemap data:', error);
return [];
}
})
export default defineSitemapEventHandler(async () => {
try {
const response = await fetch('https://backend.api.url/urls');
const data = await response.json();

if (Array.isArray(data)) {
return data;
} else {
console.error('Unexpected data format from api.mcmodels.net/urls');
return [];
}
} catch (error) {
console.error('Error fetching sitemap data:', error);
return [];
}
})
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
not super happy with it but it works fine
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
I did find a workaround last night @Broken
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
I put in a github issue, I doubt its a bug with a module but I don't know what else to do.
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Or some rule that the sitemap won't pull from the same domain or something silly
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Yeah I will be creating an issue if this thread doesn't work out. It's such a basic thing I presumed it to be a config issue or something.
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Just a bunch of bots trying to hit wordpress endpoints that don't exist :heh:
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Also clean
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
No I am ssh'ed into my server looking at laravel.log right now, there is no related errors
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
No description
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
I did just update the API as well to fix the last modified column being null.
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Laravel logs are error-free (from anything related to this) xD
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
I may not build the site for a few days/weeks, but products and stores change daily.
61 replies