我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们

Setting a Markdown processor for your GitHub Pages site using Jekyll

You can choose a Markdown processor to determine how Markdown is rendered on your GitHub Pages site.

GitHub Pages is available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see "GitHub's products."

People with write permissions for a repository can set the Markdown processor for a GitHub Pages site.

GitHub Pages supports two Markdown processors: kramdown and GitHub's own extended CommonMark processer, which is used to render GitHub Flavored Markdown throughout GitHub. 更多信息请参阅“关于 GitHub 上的书写和格式化”。

You can use GitHub Flavored Markdown with either processor, but only our CommonMark processor will always match the results you see on GitHub.

  1. On GitHub, navigate to your site's repository.

  2. In your repository, browse to the _config.yml file.

  3. 在文件视图的右上角,单击 打开文件编辑器。

    编辑文件按钮

  4. Find the line that starts with markdown: and change the value to kramdown or GFM.

    Markdown setting in config.yml

  5. At the bottom of the page, type a short, meaningful commit message that describes the change you made to the file. You can attribute the commit to more than one author in the commit message. For more information, see "Creating a commit with multiple co-authors."

    有关更改的提交消息

  6. 以下是提交消息字段,请单击电子邮件地址下拉菜单并选择 Git 作者电子邮件地址。 只有经过验证的电子邮件地址才会出现在此下拉菜单中。 如果您启用了电子邮件地址隐私保护,则 <username>@users.noreply.github.com 为默认的提交作者电子邮件地址。 更多信息请参阅“设置提交电子邮件地址”。

    Choose commit email addresses

  7. 在提交消息字段下面,确定是要将提交添加到当前分支还是新分支。 If your current branch is master, you should choose to create a new branch for your commit and then create a pull request. For more information, see "Creating a new pull request."

    提交分支选项

  8. Click Propose new file.

    Propose new file button

延伸阅读

问问别人

找不到要找的内容?

联系我们