If you want to use pure React, you might want to use something like Create React App, or Vite + React. You can pull in a Markdown library like react-markdown to parse blog posts.
I would also recommend using something like Astro (https://astro.build/), which can parse markdown and React natively.
you could use libraries like CKEditor, and Quill for advanced editors where you could add some images, and code snippets. and send the value of that editor to your server.
but you might like react-markdown if you don't like editors.
发布评论
评论(2)
如果要使用纯React,则可能需要使用诸如Create React App或Vite + React之类的内容。您可以将React-Markdown的宣传库删除到解析博客文章。
我还建议使用astro( https://astro.build/ )本地。
If you want to use pure React, you might want to use something like Create React App, or Vite + React. You can pull in a Markdown library like react-markdown to parse blog posts.
I would also recommend using something like Astro (https://astro.build/), which can parse markdown and React natively.
您可以使用Ckeditor之类的库,以及用于高级编辑器的Quill,您可以在其中添加一些图像和代码片段。并将该编辑器的值发送到您的服务器。
但是,如果您不喜欢编辑,您可能会喜欢React-Markdown。
you could use libraries like CKEditor, and Quill for advanced editors where you could add some images, and code snippets. and send the value of that editor to your server.
but you might like react-markdown if you don't like editors.