website/content/tips_and_tricks.txt in webby-0.5.1 vs website/content/tips_and_tricks.txt in webby-0.6.0
- old
+ new
@@ -13,12 +13,10 @@
h2(#toc_cr){clear:none}. CodeRay
To include "CodeRay":http://coderay.rubychan.de/ syntax highlighting support in a page you need to have the @coderay@ gem installed, and you need to include the CodeRay stylesheet in your layout. The following example shows a page that uses CodeRay syntax highlighting combined with Textile markup.
-Note how the @coderay@ block is enclosed by a @notextile@ block. This ensures that the Textile filter does not clobber the generated syntax highlighting.
-
<pre class="code">
---
title: CodeRay Example
filter:
- erb
@@ -28,12 +26,11 @@
h2. <%= h(@page.title) %>
This is the @render_page@ function from the Webby static website generation
system. It is used to render a page by applying the specified filters in
succession to the page contents.
-
-<notextile><notextile>
+<notextile>
<coderay lang="ruby" line_numbers="inline">
# call-seq:
# render_page => string
#
# Apply the desired filters to the page. The filters to apply are
@@ -48,9 +45,8 @@
end
str
end
</coderay>
-</notextile></notextile>
-</pre>
+</notextile></pre>
-There are more options that can be passed to the CodeRay syntax highlighter than those shown in the example above. Take a look at the RDoc documentation for the "CodeRayFilter":http://webby.rubyforge.org/rdoc/classes/Webby/CodeRayFilter.html class for more information.
+There are more options that can be passed to the CodeRay syntax highlighter than those shown in the example above. Take a look at the RDoc documentation for the "CodeRay Filter":http://webby.rubyforge.org/rdoc/classes/Webby/CodeRayFilter.html class for more information.