module Jekyll::DataPageLinkGenerator

Public Instance Methods

datapage_url(input, dir) click to toggle source

use it like this: {{input | datapage_url: dir}} to generate a link to a data_page.

the filter is smart enough to generate different link styles according to the data_page-dirs directive …

… however, the filter is not smart enough to support different extensions for filenames.

Thus, if you use the `extension` feature of this plugin, you need to generate the links by hand

# File lib/jekyll-datapage-generator.rb, line 203
def datapage_url(input, dir)
  extension = @context.registers[:site].config['page_gen-dirs'] ? '/' : '.html'
  "#{dir}/#{sanitize_filename(input)}#{extension}"
end