A simple blog powered by Next.js and the Cosmic headless CMS
Now, if you’ve chosen to follow along exactly, there’ll be some missing pieces before you can actually deploy this project. Take a look at the sample code to see what you might need and make adjustments accordingly to get it up and running.
DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:
It is highly recommended to use an XSS Sanitizer like DOMPurify to sanitize HTML and prevent XSS attacks. For Next.js projects, which prominently feature server-side rendering, Isomorphic DOMPurify is especially valuable. It offers a seamless sanitization process across both server and client, ensuring consistent HTML sanitization in environments like Next.js where a native server-side DOM isn't present.
Appwrite - The open-source backend cloud platform. Add Auth, Databases, Functions, and Storage to your product and build any application at any scale while using your preferred coding languages and tools.
Markdown component for React
You can also choose to convert this to Markdown and use our Markdown metafield instead if you prefer, just note you’ll need to install a markdown package to do so. The article Building React Components from headless CMS markdown is a great read about how a package like React Markdown parses markdown from a headless CMS, and explains how to render markdown in a Next.js application.
Show HN: ChatHN – Chat with Hacker News using natural language
2 projects | news.ycombinator.com | 25 Jun 2023
Whats the best way to render react native elements from a json?
1 project | /r/learnprogramming | 5 Jun 2023
Adding Markdown to Framer
2 projects | dev.to | 24 Apr 2023
[vite]: Rollup failed to resolve import "react-markdown" from
3 projects | /r/reactjs | 21 Apr 2023
creating a blog on the same web app
1 project | /r/reactjs | 28 Feb 2023