README.md in sweetie-1.0.1 vs README.md in sweetie-1.0.2

- old
+ new

@@ -1,83 +1,107 @@ -Sweetie is a plugin for [jekyll](https://github.com/mojombo/jekyll) to count all links, images, -pages, and the last build time on a jekyll site. You can then use this information at a any place in -your jekyll project.[![Travis](http://travis-ci.org/matthias-guenther/sweetie.png)](http://travis-ci.org/matthias-guenther/sweetie) +Sweetie is a plugin for [jekyll](https://github.com/mojombo/jekyll) to count all links, images, pages, and the last +build time on a jekyll site. It can also grab the last changes of your bitbucket repositories. +You can then use this information at a any place in your jekyll project. -## Installation ## +## Installation - gem install sweetie +```sh +$ gem install sweetie +``` -## Possible usage ## +## Usage The easiest way is to add `require 'sweetie'` on the top of your Rakefile. Before you build your page, you can run a rake task to update the status information of a page: - desc 'write stats in the _config.yml' - task :create_stati do - Sweetie::Conversion.conversion - end +```ruby +desc 'write stats in the _config.yml' +task :create_stati do + Sweetie::Conversion.conversion +end +``` + + A similar task can be implemented for the bitbucket repositories: - desc 'write stats in the _config.yml' - task :create_bitbucket do - Sweetie::Bitbucket.bitbucket("yourname") - end +```ruby +desc 'write stats in the _config.yml' +task :create_bitbucket do + Sweetie::Bitbucket.bitbucket("yourname") +end +``` -## Configuration variables of jekyll ## +## Configuration variables of jekyll + Call the class method `Sweetie::Bitbucket.bitbucket("yourname")` and it will automatically append the `build`, `htmlpages`, `images`, and `links` in your `_config.yml` file. You can then use them everywhere in your page with the liquid snippet for example: - `{{ site.build }}` - `{{ site.htmlpages }}` - `{{ site.images }}` - `{{ site.links }}` -## Last changes of bitbucket repository ## +## Last changes of bitbucket repository -Call the class method `Sweetie::Bitbucket.bitbucket("yourname")` and it will automatically append -the repository name an the last change of the repository in your `_config.yml`. Here is an example: +Call the class method `Sweetie::Bitbucket.bitbucket("yourname")` and it will automatically append the repository name an +the last change of the repository in your `_config.yml`. Here is an example: - git: 2011-10-16 - pmwiki-twitter-recipe: 2011-10-29 -You can then use this variables in the view of your jekyll project with the liquid template. For -example: +```yml +git: 2011-10-16 +pmwiki-twitter-recipe: 2011-10-29 +``` - ### git ### - <section class="lastupdate"> - Last update {{ site.git }} - </section> - ... +You can then use this variables in the view of your jekyll project with the liquid template. For example: - ### Twitter ### +```markdown +### git - <section class="lastupdate"> - Last update {{ site.pmwiki-twitter-recipe }} - </section> - ... +<section class="lastupdate"> +Last update {{ site.git }} +</section> +... + +### Twitter + +<section class="lastupdate"> +Last update {{ site.pmwiki-twitter-recipe }} +</section> +... +``` + + will result the following html: - <h3 id="git">Git</h3> +```html +<h3 id="git">Git</h3> - <section class="lastupdate"> - Last update 2011-10-16 - </section> +<section class="lastupdate"> +Last update 2011-10-16 +</section> - <h3 id="twitter">Twitter</h3> +<h3 id="twitter">Twitter</h3> - <section class="lastupdate"> - Last update 2011-10-16 - </section> +<section class="lastupdate"> +Last update 2011-10-16 +</section> +``` + +## License + +This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License). + +© 2011-2015 Matthias Günther <matthias@wikimatze.de>.