react-markdown
gray-matter
Our great sponsors
react-markdown | gray-matter | |
---|---|---|
48 | 17 | |
12,167 | 3,762 | |
1.8% | - | |
7.2 | 1.2 | |
29 days ago | 10 days ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
react-markdown
-
Minified React error #426
This error related to the ReactMarkdown component and the useDisclosure hook in the @chakra-ui/react.
-
Introducing Content Collections
The example above uses react-markdown, but you can use any library you want to render the markdown content. You can also use a transform function to modify the markdown content during the build process. Here is an example that uses MDX to compile the markdown content.
-
33 React Libraries Every React Developer Should Have In Their Arsenal
21.react-markdown
- 給前端的簡單 AI 教學 - 2.3 在 llm 回應中渲染 custom component
-
Construindo um Painel de Blog Dinâmico com Next.js
github.com/remarkjs/react-markdown - Biblioteca para renderizar markdown em nosso componente react.
-
I built an Markdown editor using Next.js and TailwindCss 🔥
3. Setup react-markdown and @tailwindcss/typography
-
Creating Own Chat GPT
The OpenAI API returns responses in Markdown format. To display responses from the chat, which contain formatting, I used the ReactMarkdown component. For code inserts, I used React Syntax Highlighter.
-
Crafting a Dynamic Blog with Next.js 13 App Directory
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
Thank you! It's actually all thanks to the amazing react-markdown package (https://github.com/remarkjs/react-markdown), can't take any credits there :')
-
Whats the best way to render react native elements from a json?
Perhaps something like a markdown renderer. There are plenty of projects that can render markdown, so you could store your blogs that way instead.
gray-matter
-
Building a flat-file CMS with Angular
Writing in markdown is super convenient, and supported by just about any text editor. To convert these .md files to browser-ready HTML, I wrote a simple little Node.js script using two great npm packages called gray-matter and showdown.
-
Eleventy vs. Next.js for static site generation
Next, install gray-matter to extract metadata from the front matter of markdown files, and marked to convert the markdown files to HTML:
-
Exploring the code behind Docusaurus
It turns out that Docusaurus uses an open source JavaScript parser called gray-matter to parse the front matter from markdown files! After installing gray-matter using npm and them importing it into the markdownUtils.ts file, all it takes is calling the matter method and passing the markdown file contents to get returned an Object with data and content (the data being the front matter and the content being the rest of the markdown file contents).
-
Create an Interactive Table of Contents for a Next.js Blog with Remark
Although we are building a custom table of contents, we won't have to write everything from scratch. To separate the Markdown/MDX content from the front matter, we'll use the Gray-matter package. It is optional in case you don't have front matter in your Markdown files. To process the Markdown itself, we'll use the Remark package. We'll also need the unist-util-visit package for traversing node trees and mdast-util-to-string for getting the text content of a node.
-
Create your own blog with MDX and NextJS
In this article we walk you through the process of creating a simple blog app using the popular React framework NextJS, gray-matter and next-mdx-remote.
-
NextJS 13 Blog Starter
In order to get post information (such as author, title, date, etc.) from our HTML without having them be apart of our rendered post we need a way to parse YAML front matter, this is where gray-matter comes in hand.
-
Loading local markdown blog posts - part 12
To do this, we use the matter npm package.
-
Create a Markdown Editor with Rust and React
It’s actually not part of the CommonMark spec, so you’ll often need a 3rd party library to parse it out on top of your Markdown parser. In JavaScript we use gray-matter which converts frontmatter into a JS object we can more easily use.
-
Turn a Markdown blog to a simple SSG
Over the past few weeks, I mostly wrote on how to template a Node.js application with EJS using Express. Then, I wrote an article showing how to create a Markdown blog in Node.js using EJS, Express, gray-matter and markdown-it. Today, I'll combine those tutorials to turn the Markdown blog, from the last tutorial, into a simple SSG.
-
Markdown blog with EJS
gray-matter, to parse the front matter from the Markdown files
What are some alternatives?
remark - markdown processor powered by plugins part of the @unifiedjs collective
front-matter - Extract YAML front matter from strings
remark-gfm - remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists)
rehype-sanitize - plugin to sanitize HTML
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
micromark - small, safe, and great commonmark (optionally gfm) compliant markdown parser
docsify - 🃏 A magical documentation site generator.
remark-toc - plugin to generate a table of contents (TOC)
next-markdown-blog - A lightly opinionated, full-featured Next.js blog managed through Git Workflows with markdown files.
vite-plugin-svgr - Vite plugin to transform SVGs into React components
next-markdown-blog