scoped titlebar styling to figcaptions under figures with role="code", added an example for overriding a style in sass/custom/styles.scss

This commit is contained in:
Brandon Mathis
2011-07-17 20:28:02 -04:00
parent 790521a44b
commit 4dfc5c1d67
3 changed files with 8 additions and 4 deletions

View File

@ -25,7 +25,7 @@ module Jekyll
code = file.read
file_type = file.extname
url = "#{context.registers[:site].config['url']}/#{code_dir}/#{@file}"
source = "<figure><figcaption><span>#{file.basename}</span> <a href='#{url}'>download</a></figcaption>\n"
source = "<figure role=code><figcaption><span>#{file.basename}</span> <a href='#{url}'>download</a></figcaption>\n"
source += "{% highlight #{file_type} %}\n" + code + "\n{% endhighlight %}</figure>"
partial = Liquid::Template.parse(source)
context.stack do