-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rules
executable file
·57 lines (49 loc) · 1.48 KB
/
Rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
#!/usr/bin/env ruby
require 'scholarmarkdown/snippets'
require 'scholarmarkdown/filter/acronym'
require 'scholarmarkdown/filter/citation'
require 'scholarmarkdown/filter/hyphenate_iri'
require 'scholarmarkdown/filter/include_code'
require 'scholarmarkdown/filter/labelify'
require 'scholarmarkdown/filter/references_to_footer'
require 'scholarmarkdown/filter/headerids_to_section'
require 'scholarmarkdown/filter/citation_metadata'
require 'scholarmarkdown/preprocess/katex'
Encoding.default_external = "UTF-8"
compile '/index.*' do
filter :erb
filter :scholar_citation, bibfile: items['/references.bib'],
style: 'lncs-custom'
filter :kramdown, math_engine: 'sskatex',
math_engine_opts: {
:katex_js=> File.join(Katex.gem_path, 'vendor', 'katex', 'javascripts', 'katex.js')
}
filter :scholar_hyphenate_iri
filter :scholar_include_code
filter :scholar_labelify
filter :scholar_references_to_footer
filter :scholar_headerids_to_section
filter :rubypants
layout '/default.*'
filter :scholar_citation_metadata
end
ignore '/*.md'
ignore '/*.bib'
ignore '/*.csv'
route '/**/*.{html,md}*' do
if item.identifier =~ '/index.*'
'/index.html'
else
item.identifier.without_ext + '/index.html'
end
end
compile '/**/{screen,print}.scss' do
filter :sass, syntax: :scss,
style: :compressed
write item.identifier.without_ext + '.css'
end
ignore '/**/*.scss'
compile '/**/*' do
write item.identifier.to_s
end
layout '/**/*', :erb