Class: Metanorma::Cli::Commands::Site

Inherits:
ThorWithConfig show all
Defined in:
lib/metanorma/cli/commands/site.rb

Constant Summary collapse

SITE_OUTPUT_DIRNAME =
"_site".freeze

Instance Method Summary collapse

Instance Method Details

#generate(source_path = Dir.pwd) ⇒ Object



32
33
34
35
36
37
38
39
40
41
# File 'lib/metanorma/cli/commands/site.rb', line 32

def generate(source_path = Dir.pwd)
  Cli::SiteGenerator.generate(
    source_path,
    options,
    filter_compile_options(options),
  )
  UI.say("Site has been generated at #{options[:output_dir]}")
rescue Cli::Errors::InvalidManifestFileError
  UI.error("Invalid data in: #{options[:config]}")
end