我想使用kramdown标签与':'在他们,即。{:toc}
和coderay代码块
{:lang="javascript"}
在我的Octopress博客,但我一直得到这个错误时运行
rake generate
:
[my user dir]/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/psych.rb:203:in
`parse': (<unknown>): could not find expected ':'
while scanning a simple key at line 8 column 1 (Psych::SyntaxError)
我已经安装了kramdown和coderay gem,并对我的_config.yml做了以下更改:
markdown: kramdown
kramdown:
auto_ids: true
use_coderay: true`
coderay:
coderay_line_numbers: nil
coderay_css: class`
我的blogpost toc代码看起来像这样:
---
layout: page
title: "resources"
date: 2013-06-06 10:45
comments: true
sharing: true
footer: true
categories: [3D UI, css, CSS3D, HTML5, javaScript, three.js,
smart tv, grunt, jQuery, node.js, bootstrap, css,
responsive design, api, learning, backbone.js, knockout.js]
---
#Resources
{:toc}
## **Performance and Caching**
* [Varnish](https://www.varnish-cache.org/)
{:toc}
## **SmartTV**
* [Samsung Development Guide](http://www.samsungdforum.com/Guide/)
* [Basic SmartTV Node App Server](https://github.com/rposbo/basic-smart-tv-app-server)
{:toc} [ .. snip .. ]
代码块代码看起来像这样:
`renderer = new THREE.CSS3DRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.domElement.style.position = 'absolute';
document.getElementById('video_container').appendChild(renderer.domElement);`
{:lang="javascript"}
我在这篇文章中添加了coderay scss
没有:标签,网站生成的很好。
我错过了什么?
任何帮助将不胜感激!
我注意到的第一件事是您没有正确使用{:toc}标记。它是这样工作的:
* a random unordered list with only one item
{:toc}
# header 1
# header 2
无序列表用标签标记,并且被从标题标签生成的列表替换为。见:http://kramdown.rubyforge.org/converter/html.html toc
如果这没有帮助,那么请尝试创建一个最小的示例并将代码发布到某个地方,最好是在github上。:)