Material-ui: 博客版式示例中的Markdown无效

创建于 2018-11-03  ·  3评论  ·  资料来源: mui-org/material-ui

我已经从博客示例页面粘贴了文件,但是.md文件没有加载到屏幕上。

看看它在我看来。

我究竟做错了什么?

有人知道如何帮助我吗?

非常感谢你。
马可

image

question

最有用的评论

@Marcosul似乎create-react-app不支持降价格式: https

  • 您可以将markdown文件转换为将markdown导出为字符串的JavaScript模块。
--- a/blog-post.md
+++ b/blog-post.md.js
-## Sample blog post

-#### April 1, 2020 by Olivier

-This blog post shows a few different types of content that are supported and styled with
-Material styles. Basic typography, images, and code are all supported.
-You can extend these by modifying `Markdown.js`.
+export default `
+## Sample blog post

+#### April 1, 2020 by Olivier

+This blog post shows a few different types of content that are supported and styled with
+Material styles. Basic typography, images, and code are all supported.
+You can extend these by modifying `Markdown.js`.
+`;
  • 您可以弹出并添加此webpack加载器。

所有3条评论

@Marcosul捆绑程序在加载markdown的内容时遇到问题,它停在文件名上:

https://github.com/mui-org/material-ui/blob/7e32503b40a57f42f906add50a2ace9341aa0895/docs/src/pages/page-layout-examples/blog/Blog.js#L17 -L20

如果您使用的是webpack,则可以配置raw-loader来处理markdown扩展( .md )。

您好,Oliver,我没有使用webpack。 我使用了来自的react-create-app
mui wue的存储库没有webpack。 我该怎么办?

谢谢

Em Dom,2018年11月4日09:31,Olivier Tassinari [email protected]
escreveu:

@Marcosul https://github.com/Marcosul捆绑器有问题
加载markdown的内容,它停在文件名上:

https://github.com/mui-org/material-ui/blob/7e32503b40a57f42f906add50a2ace9341aa0895/docs/src/pages/page-layout-examples/blog/Blog.js#L17 -L20

如果您使用的是webpack,则可以配置raw-loader
https://github.com/webpack-contrib/raw-loader处理减价
扩展名(.md)。

-
您收到此邮件是因为有人提到您。
直接回复此电子邮件,在GitHub上查看
https://github.com/mui-org/material-ui/issues/13501#issuecomment-435661845
或使线程静音
https://github.com/notifications/unsubscribe-auth/AEfuIsetDNby_ZrJfYIS-kyA1aIa2nqIks5urs_4gaJpZM4YNAFA

@Marcosul似乎create-react-app不支持降价格式: https

  • 您可以将markdown文件转换为将markdown导出为字符串的JavaScript模块。
--- a/blog-post.md
+++ b/blog-post.md.js
-## Sample blog post

-#### April 1, 2020 by Olivier

-This blog post shows a few different types of content that are supported and styled with
-Material styles. Basic typography, images, and code are all supported.
-You can extend these by modifying `Markdown.js`.
+export default `
+## Sample blog post

+#### April 1, 2020 by Olivier

+This blog post shows a few different types of content that are supported and styled with
+Material styles. Basic typography, images, and code are all supported.
+You can extend these by modifying `Markdown.js`.
+`;
  • 您可以弹出并添加此webpack加载器。
此页面是否有帮助?
0 / 5 - 0 等级

相关问题

FranBran picture FranBran  ·  3评论

ghost picture ghost  ·  3评论

ryanflorence picture ryanflorence  ·  3评论

zabojad picture zabojad  ·  3评论

newoga picture newoga  ·  3评论