Class: Jekyll::EntryFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-multisite.rb

Overview

excluded files

Instance Method Summary collapse

Instance Method Details

#relative_to_source(entry) ⇒ Object



125
126
127
128
129
130
131
132
133
134
135
# File 'lib/jekyll-multisite.rb', line 125

def relative_to_source(entry)

  shared_base = File.join('/..', @site.config['shared_dir'])
  rel_path = File.join(base_directory, entry)

  if base_directory.start_with?(shared_base)
    rel_path.sub(/^#{shared_base}/,'')
  else
    rel_path
  end
end