Elegant pull-quotes for Jekyll sites.
Add this gem to your site's Gemfile in the :jekyll_plugins
group:
group :jekyll_plugins do
gem 'octopress-pullquote-tag'
end
Then install the gem with Bundler
$ bundle
$ gem install octopress-pullquote-tag
Then add the gem to your Jekyll configuration.
gems:
-octopress-pullquote-tag
- Surround the paragraph you want to quote from with a
{% pullquote %}
tag. - Surround the quote you want to use with
{"
and"}
.
For example:
{% pullquote %}
When writing long-form posts, I find it helpful to include pull-quotes, which help
those scanning a post discern whether or not a post is helpful. It is important to
note, {" pull-quotes are merely visual in presentation and should not appear twice in the text. "} That
is why it is preferred to use a CSS only technique for styling pull-quotes.
{% endpullquote %}
This will output the following:
<p><span data-pullquote="pullquotes are merely visual in presentation and should not appear twice in the text."></span>
When writing long-form posts, I find it helpful to include pull-quotes, which help
those scanning a post discern whether or not a post is helpful. It is important to
note, pull-quotes are merely visual in presentation and should not appear twice in the text. That
is why it is preferred to use a CSS only technique for styling pull-quotes.</p>
This plugin does not currently ship with its own CSS for styling. Octopress themes will have styling for this or you may look to Maykel Loomans for inspiration.
By default pull-quotes will be given the classname pullquote-right
. For center or left aligned pull quotes, add the alignment to the
tag like this.
{% pullquote %} #=> class='pullquote-right'
{% pullquote left %} #=> class='pullquote-left'
{% pullquote center %} #=> class='pullquote-center'
Any other text added to the pull-quote tag will be added as a classname too.
{% pullquote big %} #=> class='pullquote-right big'
{% pullquote left highlight %} #=> class='pullquote-left highlight'
- Fork it ( https://github.com/octopress/pullquote-tag/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request