diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb index 9b0e9c9f2..3840375c1 100644 --- a/lib/jekyll/document.rb +++ b/lib/jekyll/document.rb @@ -1,3 +1,5 @@ +# encoding: UTF-8 + module Jekyll class Document include Comparable @@ -82,7 +84,7 @@ module Jekyll end # Determine whether the document has a YAML header. - # + # # Returns true if the file starts with three dashes def has_yaml_header? @has_yaml_header unless @has_yaml_header.nil? @@ -198,7 +200,7 @@ module Jekyll unless defaults.empty? @data = defaults end - @content = File.open(path, "rb") { |f| f.read } + @content = File.open(path, "rb", merged_file_read_opts(opts)) { |f| f.read } if content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m @content = $POSTMATCH data_file = SafeYAML.load($1) diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb index 25a1552c5..f5d30133b 100644 --- a/lib/jekyll/renderer.rb +++ b/lib/jekyll/renderer.rb @@ -1,3 +1,5 @@ +# encoding: UTF-8 + module Jekyll class Renderer diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 87b84f0e2..a656b0882 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -1,3 +1,5 @@ +# encoding: UTF-8 + module Jekyll class Site attr_accessor :config, :layouts, :posts, :pages, :static_files, diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index 97e5c7541..f90f8e8a6 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -1,3 +1,5 @@ +# encoding: UTF-8 + module Jekyll module Tags class IncludeTagError < StandardError