lib/liquidoc.rb in liquidoc-0.12.0.pre.rc2 vs lib/liquidoc.rb in liquidoc-0.12.0.pre.rc3
- old
+ new
@@ -586,11 +586,11 @@
when "parse"
reqs = ["template,output"]
when "render"
reqs = ["output"]
end
- for req in required
+ for req in reqs
if (defined?(req)).nil?
raise "ActionSettingMissing"
end
end
end
@@ -1060,10 +1060,11 @@
# Add attributes from command-line -a args
@logger.debug "Final pre-Asciidoctor attributes: #{attrs.to_yaml}"
# Perform the aciidoctor convert
if build.backend == "pdf"
@logger.info "Generating PDF. This can take some time..."
+ attrs.merge!({"pdf-theme"=>build.style}) if build.style
end
Asciidoctor.convert_file(
doc.index,
to_file: to_file,
attributes: attrs,
@@ -1071,10 +1072,10 @@
backend: build.backend,
doctype: build.doctype,
safe: "unsafe",
sourcemap: true,
verbose: @verbose,
- mkdirs: true
+ mkdirs: true,
)
@logger.info "Rendered file #{to_file}."
end
def generate_site doc, build