Тёмный

Add Comments to Next 14 & Sanity Blog 

Codewalk Empire
Подписаться 1,5 тыс.
Просмотров 674
50% 1

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

 

23 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 13   
@KaluKarKK
@KaluKarKK 4 месяца назад
Newsletter feature using resend and react email. 🙏
@BurbenogExpert
@BurbenogExpert 4 месяца назад
Awesome stuff man. I learned a lot from watching your tutorials and guides.
@codewalkempire
@codewalkempire 4 месяца назад
Glad to hear it!
@faruksardar8829
@faruksardar8829 Месяц назад
One of the best video 🙌🙌
@mrtrza
@mrtrza 3 месяца назад
great series
@timikuzwe
@timikuzwe 4 месяца назад
Thank you sir. If you could add a footer, It would be amazing. It would be complete.
@yomeyo99
@yomeyo99 4 месяца назад
Do you need to validate the data sent to the api to make sure there is no malicious code sent in the comment textarea? Can you implement a feature to notify the owner of the blog when a comment is posted or make the comment pending until approved by the owner?
@codewalkempire
@codewalkempire 4 месяца назад
It's always advised to do so in production-ready applications. Especially if users can send HTML through form data (e.g. Rich Text editors). In that case, HTML sanitization is crucial - you can use DOMPurify or similar libs for that purpose. In our case here, while the risk of XSS is lower with a plain text comment field, it's still good practice to implement some level of validation like length limitations for comments or special characters sanitization. For the notification feature, you can use sanity webhooks and trigger them when the new document of type "comment" is created. And for the approval system, it's just one more boolean-type field in sanity schema. Then when fetching comments just check for approved ones. I hope this helps! I'll definitely do a video on sanity webhooks end sending emails in the upcoming days, so stay tuned :)
@gadgetgrader
@gadgetgrader 2 месяца назад
Are the comments indexed by google like with wordpress?
@codewalkempire
@codewalkempire Месяц назад
Comments are part of the rendered html of the page so yes
Далее
Next.js 14 - SEO & Metadata Tutorial (Complete Guide)
39:40
Guy annoys girlfriend with puns at Ikea
2:11
Просмотров 28 млн
Draw My Life - Markiplier
13:38
Просмотров 32 млн
Club Penguin's Final Minutes
8:07
Просмотров 17 млн
why do I hear boss music? (original)
0:52
Просмотров 42 млн
Solving the IMPOSSIBLE LOTUS Puzzle!! LEVEL 10!
17:43
Field Guide to Comments in Sanity Studio
10:23
Build a Form and Send Email with HTML Only
23:39