首页 > 解决方案 > Markdown 文件无法处理无序列表 Gatsby

问题描述

我正在使用 Gatsby 建立一个新网站。我想为博客呈现一些降价文件,但它似乎无法根据降价语法处理列表/无序列表。例如,这是语法:

* Purple dots are points on the graph, each point has an x and y coordinate. These are your observed values

* Blue line is the prediction line, covering the estimated values of the model

* The red line between each purple point and the prediction line are the errors. Each error is the distance from the point to its predicted point.

这是输出:

无序列表

我还发现无法#用于标题。例如,这是我的帖子描述和标题:

_Making Use of the scipy.optimize Library in Python to Minimize Error_

## Revision

输出:

标题和描述

我不确定我需要在 Gatsby 中进行哪些更改才能正确呈现降价?

标签: reactjsgraphqlmarkdowngatsby

解决方案


您的代码正在正确呈现降价文件,但是,您没有添加任何样式以使它们看起来像无序列表或标题。

只需添加您的样式表文件:

import './yourStyles.scss'

yourStyles.scss

h1 {
   font-size: 3rem;
   color: red;
}

ul {
  list-style-type: default; // change it by desired value
}

推荐阅读