Module: Bridgetown::Site::Builder

Included in:
Bridgetown::Site
Defined in:
bridgetown-core/lib/bridgetown-core/concerns/site/builder.rb

Instance Method Summary collapse

Instance Method Details

#buildObject

rubocop:disable Metrics/AbcSize



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'bridgetown-core/lib/bridgetown-core/concerns/site/builder.rb', line 5

def build # rubocop:disable Metrics/AbcSize
  Bridgetown.logger.info "Environment:", Bridgetown.environment.cyan
  Bridgetown.logger.info "Source:", source
  Bridgetown.logger.info "Destination:", destination
  Bridgetown.logger.info ""
  Bridgetown.logger.info "Starting:", "Bridgetown v#{Bridgetown::VERSION.magenta} " \
                                      "(codename \"#{Bridgetown::CODE_NAME.yellow}\")"
  Bridgetown.logger.info ""

  t = Time.now
  if config["unpublished"]
    Bridgetown.logger.info "Unpublished mode:",
                           "enabled. Processing documents marked unpublished"
  end
  Bridgetown.logger.info "Generating…"
  process
  Bridgetown.logger.info "Done! 🎉", "#{"Completed".bold.green} in less than " \
                                    "#{(Time.now - t).ceil(2)} seconds."
end