Cleaner output when generating site.
This commit is contained in:
parent
e4042e56b7
commit
dd7c5870d9
|
@ -131,12 +131,16 @@ module Jekyll
|
|||
config_file = File.join(source, '_config.yml')
|
||||
begin
|
||||
config = YAML.load_file(config_file)
|
||||
raise "Invalid configuration - #{config_file}" if !config.is_a?(Hash)
|
||||
$stdout.puts "Configuration from #{config_file}"
|
||||
raise "Invalid configuration file: #{config_file}" if !config.is_a?(Hash)
|
||||
$stdout.puts "Configuration file: #{config_file}"
|
||||
rescue => err
|
||||
$stderr.puts "WARNING: Could not read configuration. " +
|
||||
"Using defaults (and options)."
|
||||
$stderr.puts "\t" + err.to_s
|
||||
unless File.exists?(config_file)
|
||||
$stdout.puts "Configuration file: none"
|
||||
else
|
||||
$stderr.puts "WARNING: Could not read configuration. " +
|
||||
"Using defaults (and options)."
|
||||
$stderr.puts "\t" + err.to_s
|
||||
end
|
||||
config = {}
|
||||
end
|
||||
|
||||
|
|
|
@ -23,7 +23,9 @@ module Jekyll
|
|||
def self.build(site, options)
|
||||
source = options['source']
|
||||
destination = options['destination']
|
||||
puts "Building site: #{source} -> #{destination}"
|
||||
puts " Source: #{source}"
|
||||
puts " Destination: #{destination}"
|
||||
print " Generating... "
|
||||
begin
|
||||
site.process
|
||||
rescue Jekyll::FatalException => e
|
||||
|
@ -33,7 +35,7 @@ module Jekyll
|
|||
puts e.message
|
||||
exit(1)
|
||||
end
|
||||
puts "Successfully generated site: #{source} -> #{destination}"
|
||||
puts "done."
|
||||
end
|
||||
|
||||
# Private: Watch for file changes and rebuild the site.
|
||||
|
|
Loading…
Reference in New Issue