al-quran.reflectslight.io/nanoc/lib/mixin/inline.rb
2023-10-07 19:29:52 -03:00

15 lines
448 B
Ruby

module Mixin::Inline
def inline_json(path)
class_name = File.basename(path, File.extname(path))
"<script class='json #{class_name}' type='application/json'>" \
"#{items[path].compiled_content}" \
"</script>"
end
def inline_css(path)
class_name = File.basename(path, File.extname(path))
"<style class='css #{class_name}'>" \
"#{File.binread(File.join(build_dir, "css", "postman.css"))}" \
"</style>"
end
end