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