search

Home  >  Q&A  >  body text

git - Jekyll发布的静态Blog中Markdown解析问题

遇到的问题是这样的。我在本地用Jekyll新建了一个Blog,写好一篇post后发布到Git托管的Page上。在互联网上访问文章页面,就会发现是这个样子的:

显然,这里面有一些Markdown格式没有被正确解析成HTML,在下面给出的地址中可以看到更多错误。我尝试把同样的内容发布在Github上,结果是一样的。我在本地发布# jekyll serve),就会发现内容格式解析正确,但会有如下提示:

Generating... Maruku#to_s is deprecated and will be removed or changed in a near-future version of Maruku.

图中的文章在这里,这份提交的post在这里,另一篇跟图中文章格式类似的测试帖在这里。

并不指望能在社区直接找到解决方案,但求提供解决问题的思路,我会顺着可行的思路寻找答案。有兴趣的小伙伴可一起尝试解决。

大家讲道理大家讲道理2799 days ago651

reply all(4)I'll reply

  • 阿神

    阿神2017-04-24 09:14:19

    Maybe your git markdown parser is different from your local one, resulting in some syntax incompatibility

    reply
    0
  • 黄舟

    黄舟2017-04-24 09:14:19

    Difference issue in markdown parser. It is strongly recommended to build a local environment of github pages to preview. For the construction method, see: https://help.github.com/articles/using-jekyll-with-pages.

    Note: Never use the official jekyll engine (http://jekyllrb.com/) to generate static html. You must use your own engine from github pages: bundle exec jekyll serve. Because there is a big difference in syntax between the jekyll used by github pages and the official jekyll - this will cause the official jekyll test to take effect, but it will not take effect after being pushed to github pages.

    To avoid the local github-pages engine version being too old or some potential bugs, please remember to update in time: bundle update

    reply
    0
  • PHP中文网

    PHP中文网2017-04-24 09:14:19

    Or try adding two spaces at the end of the line?

    reply
    0
  • PHP中文网

    PHP中文网2017-04-24 09:14:19

    Ask me, what do you want

    reply
    0
  • Cancelreply