Class: Jekyll::StaticFile
- Inherits:
-
Object
- Object
- Jekyll::StaticFile
- Defined in:
- lib/jekyll/polyglot/patches/jekyll/static_file.rb
Overview
Alteration to Jekyll StaticFile provides aliased methods to direct write to skip files excluded from localization
Instance Method Summary collapse
Instance Method Details
#exclude_from_localization? ⇒ Boolean
13 14 15 16 17 18 19 |
# File 'lib/jekyll/polyglot/patches/jekyll/static_file.rb', line 13 def exclude_from_localization? return false if @site.active_lang == @site.default_lang @site.exclude_from_localization.each do |e| return true if relative_path[1..-1].start_with?(e) end false end |
#write(dest) ⇒ Object
8 9 10 11 |
# File 'lib/jekyll/polyglot/patches/jekyll/static_file.rb', line 8 def write(dest) return false if exclude_from_localization? write_orig(dest) end |
#write_orig ⇒ Object
7 |
# File 'lib/jekyll/polyglot/patches/jekyll/static_file.rb', line 7 alias_method :write_orig, :write |