Method: Jekyll::Page#dir
- Defined in:
- lib/ngage/jekyll/page.rb
#dir ⇒ Object
The generated directory into which the page will be placed upon generation. This is derived from the permalink or, if permalink is absent, will be ‘/’
Returns the String destination directory.
64 65 66 67 68 69 70 71 |
# File 'lib/ngage/jekyll/page.rb', line 64 def dir if url.end_with?("/") url else url_dir = File.dirname(url) url_dir.end_with?("/") ? url_dir : "#{url_dir}/" end end |