Sha256: 9cb609bef181c28fb6b3c8dc2d4990fbc5dd5cc382a0bf72ae953294b365eb0a

Contents?: true

Size: 886 Bytes

Versions: 4

Compression:

Stored size: 886 Bytes

Contents

module Jekyll
  module Commands
    class Doctor < Command
      class << self
        def process(options)
          site = Jekyll::Site.new(options)
          site.read

          unless deprecated_relative_permalinks(site)
            Jekyll.logger.info "Your test results", "are in. Everything looks fine."
          end
        end

        def deprecated_relative_permalinks(site)
          contains_deprecated_pages = false
          site.pages.each do |page|
            if page.uses_relative_permalinks
              Jekyll.logger.warn "Deprecation:", "'#{page.path}' uses relative" +
                                  " permalinks which will be deprecated in" +
                                  " Jekyll v1.1 and beyond."
              contains_deprecated_pages = true
            end
          end
          contains_deprecated_pages
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jekyll-1.0.4 lib/jekyll/commands/doctor.rb
jekyll-1.1.2 lib/jekyll/commands/doctor.rb
jekyll-1.1.1 lib/jekyll/commands/doctor.rb
jekyll-1.0.3 lib/jekyll/commands/doctor.rb