【发布时间】:2016-02-03 23:03:39
【问题描述】:
我刚刚将本地 Jekyll 安装升级到 Jekyll 3.0.2。
我期待在发布源代码时使用围栏(反引号)代码块。
但这不起作用,我仍然必须使用 Liquid 标签来指定代码块
我在 _config.yml 中的构建设置:
baseurl: /
destination: _site
permalink: pretty
markdown: kramdown
kramdown:
input: GFM
syntax_highlighter: rouge
已安装的 Ruby gem 列表
activesupport (4.2.5.1)
addressable (2.3.8)
bigdecimal (1.2.6)
bundler (1.11.2)
coffee-script (2.4.1)
coffee-script-source (1.10.0)
colorator (0.1)
ethon (0.8.1)
execjs (2.6.0)
faraday (0.9.2)
ffi (1.9.10 x64-mingw32)
gemoji (2.1.0)
github-pages (45)
github-pages-health-check (0.6.0)
html-pipeline (2.3.0)
i18n (0.7.0)
io-console (0.4.3)
jekyll (3.0.2)
jekyll-coffeescript (1.0.1)
jekyll-feed (0.3.1)
jekyll-gist (1.4.0)
jekyll-mentions (1.0.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.9.1)
jekyll-sass-converter (1.3.0)
jekyll-seo-tag (0.1.4)
jekyll-sitemap (0.10.0)
jekyll-textile-converter (0.1.0)
jekyll-watch (1.3.1)
jemoji (0.5.1)
json (1.8.3, 1.8.1)
kramdown (1.9.0)
liquid (3.0.6)
listen (3.0.5)
mercenary (0.3.5)
mini_portile2 (2.0.0)
minitest (5.8.4, 5.4.3)
multipart-post (2.0.0)
net-dns (0.8.0)
nokogiri (1.6.7.2 x64-mingw32)
octokit (4.2.0)
power_assert (0.2.2)
psych (2.0.8)
public_suffix (1.5.3)
rake (10.4.2)
rb-fsevent (0.9.7)
rb-inotify (0.9.5)
rdiscount (2.1.8)
rdoc (4.2.0)
redcarpet (3.3.3)
RedCloth (4.2.9)
rouge (1.10.1)
safe_yaml (1.0.4)
sass (3.4.21)
sawyer (0.6.0)
terminal-table (1.5.2)
test-unit (3.0.8)
thread_safe (0.3.5)
typhoeus (0.8.0)
tzinfo (1.2.2)
【问题讨论】:
-
代替这一行:
syntax_highlighter : rouge尝试将其替换为highlighter: rouge。对于 kramdown 输入,请确保在input: GFM之前有 2 个空格。这应该适用于代码块的这个```(这是你需要的,对吧?)。然后用 bundler 运行 Jekyll serve。 -
我已经试过了。我在输入前面使用了两个空格:GFM 我不知道如何在 Stack Overflow 上发布 YAML _config.yml。我正在使用 bundler 运行 Jekyll
bundle bundler exec jekyll serve -
嗯。我有一个类似的问题,我发现我需要在上一段和代码块标记之间留一个空行。是你做的吗?比如,写一些txt然后点击
enter或return然后再点击一次,然后是```。
标签: ruby rubygems jekyll kramdown rouge