Files

Jekyll::Commands::Doctor

Public Class Methods

conflicting_urls(site) click to toggle source
# File lib/jekyll/commands/doctor.rb, line 36
def conflicting_urls(site)
  conflicting_urls = false
  urls = {}
  urls = collect_urls(urls, site.pages, site.dest)
  urls = collect_urls(urls, site.posts, site.dest)
  urls.each do |url, paths|
    if paths.size > 1
      conflicting_urls = true
      Jekyll.logger.warn "Conflict:", "The URL '#{url}' is the destination" +
        " for the following pages: #{paths.join(", ")}"
    end
  end
  conflicting_urls
end
healthy?(site) click to toggle source
# File lib/jekyll/commands/doctor.rb, line 16
def healthy?(site)
  [
    !deprecated_relative_permalinks(site),
    !conflicting_urls(site)
  ].all?
end
process(options) click to toggle source
# File lib/jekyll/commands/doctor.rb, line 5
def process(options)
  site = Jekyll::Site.new(options)
  site.read

  if healthy?(site)
    Jekyll.logger.info "Your test results", "are in. Everything looks fine."
  else
    abort
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.