zeus.ugent.be/lib/data_sources/katex.rb

18 lines
308 B
Ruby
Raw Permalink Normal View History

2021-02-26 15:24:40 +01:00
require 'katex'
class KatexDataSource < ::Nanoc::DataSource
identifier :katex
def items
katex_css_path = File.join(Katex.gem_path, 'vendor', 'katex', 'stylesheets', 'katex.css')
[
new_item(
File.open(katex_css_path).read,
{},
"/katex.css"
)
]
end
end