vendor/laravel-frontend-presets/argon/src/argon-stubs/resources/assets/vendor/jekyll/lib/jekyll/document.rb
def read(opts = {})
      if yaml_file?
        @data = SafeYAML.load_file(path)
      else
        begin
          defaults = @site.frontmatter_defaults.all(url, collection.label.to_sym)
          unless defaults.empty?
            @data = defaults
          end
          @content = File.read(path, merged_file_read_opts(opts))
          if content =~ YAML_FRONT_MATTER_REGEXP
            @content = $POSTMATCH
            data_file = SafeYAML.load($1)
            unless data_file.nil?
              @data = Utils.deep_merge_hashes(defaults, data_file)
            end
          end
        rescue SyntaxError => e
          puts "YAML Exception reading #{path}: #{e.message}"
        rescue Exception => e
          puts "Error reading file #{path}: #{e.message}"
        end
      end
    end
# Read in the file and assign the content and data based on the file contents.
# Merge the frontmatter of the file with the frontmatter default
# values
#
# Returns nothing.
Read in the file and assign the content and data based on the file contents.
Merge the frontmatter of the file with the frontmatter default
values

Returns nothing.
Read in the file and assign the content and data based on the file contents . Merge the frontmatter of the file with the frontmatter default values Returns nothing .
def read(opts = {})
      if yaml_file?
        @data = SafeYAML.load_file(path)
      else
        begin
          defaults = @site.frontmatter_defaults.all(url, collection.label.to_sym)
          unless defaults.empty?
            @data = defaults
          end
          @content = File.read(path, merged_file_read_opts(opts))
          if content =~ YAML_FRONT_MATTER_REGEXP
            @content = $POSTMATCH
            data_file = SafeYAML.load($1)
            unless data_file.nil?
              @data = Utils.deep_merge_hashes(defaults, data_file)
            end
          end
        rescue SyntaxError => e
          puts "YAML Exception reading #{path}: #{e.message}"
        rescue Exception => e
          puts "Error reading file #{path}: #{e.message}"
        end
      end
    end
def read ( opts = { } ) if yaml_file? @data = SafeYAML . load_file ( path ) else begin defaults = @site . frontmatter_defaults . all ( url , collection . label . to_sym ) unless defaults . empty? @data = defaults end @content = File . read ( path , merged_file_read_opts ( opts ) ) if content =~ YAML_FRONT_MATTER_REGEXP @content = $POSTMATCH data_file = SafeYAML . load ( $1 ) unless data_file . nil? @data = Utils . deep_merge_hashes ( defaults , data_file ) end end rescue SyntaxError => e puts "YAML Exception reading #{path}: #{e.message}" rescue Exception => e puts "Error reading file #{path}: #{e.message}" end end end
Read in the file and assign the content and data based on the file contents.
Read in the file and assign the content and data based on the file contents .
opts