NextJs 14 Dynamic XML Sitemap

  Рет қаралды 7,652

Raddy

Raddy

Күн бұрын

Пікірлер
@RaddyDev
@RaddyDev Жыл бұрын
@alidlt2515
@alidlt2515 Жыл бұрын
That's awesome, thank you so much, please make a full course or crash course about next js. 👍
@shayankhaz
@shayankhaz 4 ай бұрын
The revalidate trick was awesome dude
@davx1992
@davx1992 8 ай бұрын
Man, thanks for this video, was struggling with revalidation, this worked! Thanks!
@emirtriedcoding
@emirtriedcoding Ай бұрын
Thanks man you saved my life ❤
@krk101
@krk101 4 ай бұрын
Thanks, man. Really appreciate your help.
@TheKobraIRAQ
@TheKobraIRAQ Жыл бұрын
What theme are you using for vscode ?
@RaddyDev
@RaddyDev Жыл бұрын
Color Theme: Dracula & File Icon: Namo Dark for Visual Studio Code
@yfullstackhub
@yfullstackhub 2 ай бұрын
You showed revalidation part and that's great! Revalidation of sitemaps not shown in documentation.
@RaddyDev
@RaddyDev 2 ай бұрын
That's true. I think that it's because revalidate is a caching feature. Maybe they could mention it
@antoniobologna
@antoniobologna 11 ай бұрын
Great video. Couple of questions: 1. What is the advantage of this as opposed to using nested sitemaps, for example `blog/post/sitemap.ts`, where you have a `blog/post/[id]/page.tsx`? 2. What about thousands of records, (there's a limit of 50K URLs for sitemaps) my concern is that for big pages this will take too long for a sitemap to generate, and also do you just get up to 50,000 records based on time creation? Cheers :D
@RaddyDev
@RaddyDev 10 ай бұрын
A flat sitemap is just easier to create and maintain and it's perfect for smaller sites. In your case a nested sitemap might be the way as it better represents your hierarchical structure. They both have their advantages and disadvantages. I haven't tried compiling thousands of records and I can imagine that it would be painful especially if the data comes from a CMS. Are they all in markdown files? It would be a cool experiment to see how long it takes to do 50,000 records. You could ask on Reddit to see what other people are experiencing
@tlmader
@tlmader 16 күн бұрын
Did you ever figure out an approach? We have an app that has a page for each post, so there are over 50K pages.
@polatbey7261
@polatbey7261 11 ай бұрын
thank you so much
@dananjayachathuranga7113
@dananjayachathuranga7113 6 ай бұрын
Thnak you and subscribed !
@sahilanand30
@sahilanand30 8 ай бұрын
thanks really helpful
@Sitepow
@Sitepow 3 ай бұрын
great thk man.
@md.fakweruddinmazumder9063
@md.fakweruddinmazumder9063 4 ай бұрын
Next.js (14.2.3) out of date (learn more) Error: Page "/sitemap.xml/[[...__metadata_id__]]/route" is missing exported function "generateStaticParams()", which is required with "output: export" config. I am getting this error. Please help me.
@RaddyDev
@RaddyDev 4 ай бұрын
You can use generateStaticParams() when it comes to pages, but for the sitemap you need to use the "export default function sitemap()" function. Unless you want to do it as a page with a custom route handler? If you need to create multiple dynamic sitemaps you can use generateSitemaps() together with sitemap(). Normally you only need to use generateSitemaps when you have more than 50,000 URLs and you need to split them per sitemap as that is the Google max number.
@milanpoudel7212
@milanpoudel7212 8 ай бұрын
will this work in pages router or not?
@RaddyDev
@RaddyDev 8 ай бұрын
I am not sure about the page router. Have a quick look into the official documentation. I am sure that they will have something there
@doylace
@doylace 9 ай бұрын
Not really working on my end I am using the next js 14
@RaddyDev
@RaddyDev 9 ай бұрын
It should work on 13 and 14 as long as you are using the App router. Do you get any errors?
@okao08
@okao08 6 ай бұрын
So sitemap can be very huge?
@eshwargetenv1
@eshwargetenv1 4 ай бұрын
@@RaddyDevhow to catche it?
@RaddyDev
@RaddyDev 4 ай бұрын
How big is your sitemap? It's cached as default.
@MikaelMeira
@MikaelMeira 7 ай бұрын
Module parse failed: Unexpected token (13:86) | | if (typeof handler !== 'function') { > throw new Error('Default export is missing in "C:\\Users\\cka\\OneDrive - Organizações\\Área de Trabalho\\projeto\\app\\sitemap.ts"') | }
@RaddyDev
@RaddyDev 7 ай бұрын
It could be the sitemap() function. It should look like this: export default async function sitemap() {
@MikaelMeira
@MikaelMeira 7 ай бұрын
@@RaddyDev Resolved: Friend, I managed to solve it after racking my brains a lot, my project was on the Desktop and One Drive, I removed it and put it in the Downloads folder, it worked perfectly!!
NextJs App Router - Multiple Sitemaps & Sitemap Index
16:20
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Domain-Driven Design: The Last Explanation You'll Ever Need
21:05
Software Developer Diaries
Рет қаралды 15 М.
Fetching Data with Nextjs | 3 Different Patterns
7:51
Ras Mic
Рет қаралды 19 М.
How the PROS Use Tailwind
9:55
Frontend FYI – by Jeroen
Рет қаралды 57 М.
Laravel Gems - Pipelines 💎
15:21
Laravel
Рет қаралды 10 М.
How to connect Next.js to a database (in 5 minutes)
5:04
Web Dev Cody
Рет қаралды 18 М.