Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Rack middleware to insert text comments into pages. First created to be used with jlong's serve, but should work with pretty much every rack app
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/rack
.gitignore
README.md
Rakefile
rack-footnotes.gemspec

README.md

Rack FootNotes

Rack::FootNotes is a very simple middleware I coded to add footnotes to prototypes created with jlong/serve

Usage

Create a notes folder in your serve project's root. Add a text file with notes for every route you want to display notes in. I.e: if you want to show notes for http://0.0.0.0:4000/foo/bar/, add them to notes/foo/bar.txt

Then, load Rack::FootNotes in your config.ru:

gem 'rack-footnotes'
require 'rack/footnotes'
use Rack::FootNotes, {
  :notes_path => 'notes',
  :extra_css => "text-align: center;"
}

There are three options:

  • :notes_path, the folder where you want to store your notes
  • :css, the CSS for the div containing the notes (don't change this unless necessary)
  • :extra_css, styles that will be added to the default CSS. Use it to change the background color, font-face, etc...
Something went wrong with that request. Please try again.