README.md in jekyll-linkpreview-0.1.0 vs README.md in jekyll-linkpreview-0.2.0

- old
+ new

@@ -1,11 +1,24 @@ # Jekyll::Linkpreview Jekyll plugin to generate link preview by `{% linkpreview %}` tag. The plugin fetches [Open Graph protocols](http://ogp.me/) of the designated page to generate preview. The og properties are saved as JSON for caching and it is used when rebuilding the site. -For example, `{% linkpreview https://github.com %}` tag generates following HTML when you run `jekyll build`, +You can pass url directly to the tag, +``` +{% linkpreview https://github.com %} +``` + +or, can pass a url variable. + +``` +{% assign github_toppage = 'https://github.com'%} +{% linkpreview github_toppage %} +``` + +The tag above generates following HTML when you run `jekyll build`, + ```html <div class="jekyll-linkpreview-wrapper"> <p><a href="https://github.com" target="_blank">https://github.com</a></p> <div class="jekyll-linkpreview-wrapper-inner"> <div class="jekyll-linkpreview-content"> @@ -36,10 +49,10 @@ See https://jekyllrb.com/docs/plugins/installation/ . ## Usage -1. Create `_cache` directory in the same hierarchy as `_site` directory. +1. Create `_cache` directory where you run `jekyll build` or `jekyll serve`. 1. Embed [linkpreview.css](assets/css/linkpreview.css) into your Website. 1. Use `{% linkpreview %}` tag.