Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lmullen/jekyll_figure
A Liquid figure tag for Jekyll sites
https://github.com/lmullen/jekyll_figure
Last synced: about 1 month ago
JSON representation
A Liquid figure tag for Jekyll sites
- Host: GitHub
- URL: https://github.com/lmullen/jekyll_figure
- Owner: lmullen
- License: mit
- Archived: true
- Created: 2014-03-20T01:11:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-05T21:03:09.000Z (over 9 years ago)
- Last Synced: 2024-04-24T20:14:51.997Z (8 months ago)
- Language: Ruby
- Size: 152 KB
- Stars: 31
- Watchers: 4
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-jekyll-plugins - **Figure Tag** - - Generate figures and captions with links to the figure in a variety of formats (Figures & Captions)
README
# Jekyll Figure
Adds a Liquid `figure` tag to a [Jekyll][] site
Lincoln A. Mullen | [email protected] | http://lincolnmullen.com
## Installation
Add this line to your Jekyll site's `Gemfile`:
gem 'jekyll_figure'
And then execute:
bundle
In the Jekyll site's `_config.yml` file, add this line:
gems: [jekyll_figure]
If you have a directory where you keep your figures, add these lines to
`_config.yml`:figures:
dir: /figuresIf you would like the figures to be enumerated (e.g., "Figure 1," "Figure
2") then add this value to `_config.yml`:figures:
enumerate: trueIf you would like to add Google Analytics event tracking to the figure
links, then add this value to `_config.yml` (you must have Google
Analytics on your site, obviously):figures:
analytics: true## Usage
To add a figure, use the figure tag in this form:
{% figure filename svg,png,pdf 'Your caption here' %}
The first value is the filename, which should be shared across every
format of the figure. The second value is a comma-separated list of
extensions for the filename. The third value is a quoted caption. The
tag will produce an img tag for the first file format in the list of
extensions. It will include a caption with links to all the figure
formats. If the figures directory is set in `_config.yml`, then the
image and the links will point there.You can [see an example here][].
## License
MIT License
[Jekyll]: http://jekyllrb.com/
[see an example here]: http://lincolnmullen.com/blog/a-figure-plugin-for-jekyll/