Skip to content

Commit 16c4473

Browse files
author
Sumit Khanna
committed
Added suport for excluded files in shared_dir
1 parent 72592c5 commit 16c4473

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/jekyll-multisite.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,24 @@ def self.sync_dir(cur, base, dest)
112112
Dir.rmdir(static_shared_dir)
113113
end
114114

115+
# excluded files
116+
117+
class EntryFilter
118+
119+
def relative_to_source(entry)
120+
121+
shared_base = File.join('/..', @site.config['shared_dir'])
122+
rel_path = File.join(base_directory, entry)
123+
124+
if base_directory.start_with?(shared_base)
125+
rel_path.sub(/^#{shared_base}/,'')
126+
else
127+
rel_path
128+
end
129+
end
130+
131+
end
132+
115133
# jekyll-pagination fixes for multi-side
116134

117135
begin

0 commit comments

Comments
 (0)