README.md in middleman-syntax-1.0.1 vs README.md in middleman-syntax-1.1.0
- old
+ new
@@ -15,10 +15,21 @@
```
activate :syntax
```
+You can also pass options to pygments:
+
+```
+activate :syntax,
+ :linenos => 'inline',
+ :anchorlinenos => true,
+ :linenostart => 2
+```
+
+See the [pygments documentation](http://pygments.org/docs/formatters/) for a full list of possible options.
+
# Usage
The extension adds a new `code` helper to Middleman that you can use from your templates:
```erb
@@ -27,12 +38,14 @@
puts message
end
<% end %>
```
-That'll produce syntax-highlighted HTML wrapped in a `<pre>` tag, wrapped in `<div class="hightlight">`. You can style this with any CSS that works on Pygments output.
+That'll produce syntax-highlighted HTML wrapped in a `<pre>` tag, wrapped in `<div class="hightlight">`. You can style this with any CSS that works on Pygments output.
+**Note** that on a default (i.e. unstyled) Middleman project, it will appear as if `middleman-syntax` isn't working, since none of the Pygments styles have any CSS applied! Open the browser Developer Tools to verify the code is being syntax highlighted.
+
The extension also makes code blocks in Markdown highlight code. Make sure you're using RedCarpet as your Markdown engine (in `config.rb`):
```ruby
set :markdown_engine, :redcarpet
set :markdown, :fenced_code_blocks => true, :smartypants => true
@@ -52,6 +65,6 @@
GitHub Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems:
https://github.com/middleman/middleman-syntax/issues
-The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit Pull Requests containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.
\ No newline at end of file
+The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit Pull Requests containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.