Octopress plugin to create footnotes on posts
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is even with fcy:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.markdown
_footnote.scss
footnote.js
footnote.rb

README.markdown

What is?

A custom Liquid tag and block to be used with Jekyll/Octopress to generate footnotes.

Inlcudes a JavaScript to generate a popover on mouseover.

Original JavaScript from LukasMathis.

How To Use?

This text needs to point to a footnote{% fn_ref 1 %} because it's good{% footnote_ref 2 %}.

{% footnotes %}
  {% fn %} A footnote is this text at the end of you page that explains something.
  {% fn %} It's good because I like it.
{% endfootnotes%}

Output:

<p>This text needs to point to a footnote<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> because it's good<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup>.</p>

<div class="footnotes">
	<ol>
		<li id="fn:1">A footnote is this text at the end of you page that explains something.<a href="#fnref:1" rev="footnote">↩</a></li>
		<li id="fn:2">It's good because I like it.<a href="#fnref:2" rev="footnote">↩</a></li>
	</ol>
</div>

Both fn_ref and footnote_ref means the same thing. Use the one you prefer.

How To Install in Octopress

It's pretty simple:

  1. Copy footnote.rb to OCTOPRESS_DIR/plugins
  2. Copy footnote.scss to OCTOPRESS_DIR/sass/custom
  3. Edit OCTOPRESS_DIR/sass/custom/_styles.scss to import footnote.scss:
@import "footnote";

To install the JavaScript:

  1. Copy footnote.js to OCTOPRESS_DIR/source/javascripts
  2. Edit OCTOPRESS_DIR/source/_includes/custom/head.html to load jQuery and footnote.jsfootnote.scss:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="{{ root_url }}/javascripts/footnote.js" type="text/javascript"></script>

License

(The MIT License)

Copyright © 2011 Felipe Cypriano

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.