Module: Jekyll::DataPageLinkGenerator

Includes:
Sanitizer
Defined in:
lib/jekyll-datapage-generator.rb

Instance Method Summary collapse

Methods included from Sanitizer

#sanitize_filename

Instance Method Details

#datapage_url(input, dir) ⇒ Object

use it like this: | 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



203
204
205
206
# 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