Module: Scms
- Includes:
- YAML
- Defined in:
- lib/scms.rb,
lib/scms/version.rb,
lib/scms/scms-parser.rb,
lib/scms/scms-pageoptions.rb
Defined Under Namespace
Classes: PageOptions, ScmsParser
Constant Summary collapse
- VERSION =
"4.4.8"
Class Method Summary collapse
Class Method Details
.build(website, settings, options) ⇒ Object
public
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/scms.rb', line 33 def Scms.build(website, settings, ) ScmsUtils.boldlog("Compiling #{website}") if settings #Bootstrap here if settings["bootstrap"] != nil bootstrap = File.join(website, settings["bootstrap"]) #ScmsUtils.log("Bootstrap is: #{settings["bootstrap"]}") if File.exists?(bootstrap) begin require_relative bootstrap rescue Exception=>e ScmsUtils.errLog(e.) ScmsUtils.log(e.backtrace.inspect) end else ScmsUtils.errLog("Bootstrap does not exist #{settings["bootstrap"]}") ScmsUtils.writelog("::Bootstrap does not exist #{settings["bootstrap"]}", website) ScmsUtils.writelog("type NUL > #{bootstrap}", website) end end Scms.generatePages(website, settings, ) else ScmsUtils.errLog("Config is empty") end ScmsUtils.boldlog("Built website:") ScmsUtils.log(ScmsUtils.uriEncode("file:///#{website}")) end |
.getSettings(configdir) ⇒ Object
public
22 23 24 25 26 27 28 29 30 |
# File 'lib/scms.rb', line 22 def Scms.getSettings(configdir) yamlpath=File.join(configdir, "_config.yml") settings = ScmsUtils.readyaml(yamlpath) if settings return settings else ScmsUtils.errLog("Config is empty") end end |