Тёмный

NextJs 14 Dynamic XML Sitemap 

Raddy
Подписаться 34 тыс.
Просмотров 6 тыс.
50% 1

Опубликовано:

 

25 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@RaddyDev
@RaddyDev 11 месяцев назад
@shayankhaz
@shayankhaz 2 месяца назад
The revalidate trick was awesome dude
@davx1992
@davx1992 6 месяцев назад
Man, thanks for this video, was struggling with revalidation, this worked! Thanks!
@alidlt2515
@alidlt2515 11 месяцев назад
That's awesome, thank you so much, please make a full course or crash course about next js. 👍
@krk101
@krk101 2 месяца назад
Thanks, man. Really appreciate your help.
@yfullstackhub
@yfullstackhub 7 дней назад
You showed revalidation part and that's great! Revalidation of sitemaps not shown in documentation.
@RaddyDev
@RaddyDev 6 дней назад
That's true. I think that it's because revalidate is a caching feature. Maybe they could mention it
@antoniobologna
@antoniobologna 9 месяцев назад
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 8 месяцев назад
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
@TheKobraIRAQ
@TheKobraIRAQ 11 месяцев назад
What theme are you using for vscode ?
@RaddyDev
@RaddyDev 11 месяцев назад
Color Theme: Dracula & File Icon: Namo Dark for Visual Studio Code
@polatbey7261
@polatbey7261 9 месяцев назад
thank you so much
@dananjayachathuranga7113
@dananjayachathuranga7113 4 месяца назад
Thnak you and subscribed !
@sahilanand30
@sahilanand30 6 месяцев назад
thanks really helpful
@Sitepow
@Sitepow Месяц назад
great thk man.
@okao08
@okao08 4 месяца назад
So sitemap can be very huge?
@eshwargetenv1
@eshwargetenv1 2 месяца назад
@@RaddyDevhow to catche it?
@RaddyDev
@RaddyDev 2 месяца назад
How big is your sitemap? It's cached as default.
@md.fakweruddinmazumder9063
@md.fakweruddinmazumder9063 2 месяца назад
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 2 месяца назад
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 6 месяцев назад
will this work in pages router or not?
@RaddyDev
@RaddyDev 6 месяцев назад
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 7 месяцев назад
Not really working on my end I am using the next js 14
@RaddyDev
@RaddyDev 7 месяцев назад
It should work on 13 and 14 as long as you are using the App router. Do you get any errors?
@MikaelMeira
@MikaelMeira 5 месяцев назад
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 5 месяцев назад
It could be the sitemap() function. It should look like this: export default async function sitemap() {
@MikaelMeira
@MikaelMeira 5 месяцев назад
@@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!!
Далее
Китайка и Красивые Глаза😂😆
00:20
Wait for it 😂
00:19
Просмотров 2,1 млн
Ванька пошел!!!! 🥰
00:18
Просмотров 362 тыс.
Global State Management in NextJs 14 Using Zustand
51:17
Next.js 14 Deployment to VPS with GitHub Actions CI/CD
52:31
Next.Js 14 - AWS S3 File Upload using Server Actions
45:25
Next.js 14 - SEO & Metadata Tutorial (Complete Guide)
39:40
Next.Js 14 - AWS S3 Image Upload using API Route
35:06
Китайка и Красивые Глаза😂😆
00:20