Cleanup
This commit is contained in:
31
site.moon
31
site.moon
@@ -17,13 +17,6 @@ Site.config.out_dir = "html/"
|
||||
-- Compile lua-filter used by Pandoc to highlight MoonScript syntax
|
||||
os.execute "moonc pygments.moon"
|
||||
|
||||
-- Configure the command our custom renderer uses to convert markdown to html
|
||||
rend = "renderers.markdown"
|
||||
require(rend).cmd = "pandoc --mathjax --lua-filter pygments.lua >"
|
||||
|
||||
-- Insert custom renderer in the first position so it will be preferred
|
||||
table.insert Site.default_renderers, 1, rend
|
||||
|
||||
-- Remove Pygments plugin
|
||||
Site.default_plugins = for v in *Site.default_plugins
|
||||
if v\find "pygments" then continue else v
|
||||
@@ -109,30 +102,26 @@ sitegen.create =>
|
||||
"—", blurb, a { "Read post →", class: "read-post-link", href: url }
|
||||
}
|
||||
|
||||
add_renderer "renderers.markdown"
|
||||
|
||||
add_all = (files) ->
|
||||
for path in *files
|
||||
add path, {
|
||||
target: target path, "/posts"
|
||||
template: "post"
|
||||
is_a: "post"
|
||||
publish_date: publish_date extract_date path
|
||||
id: extract_id path
|
||||
}
|
||||
[add path, {
|
||||
target: target path, "/posts"
|
||||
template: "post"
|
||||
is_a: "post"
|
||||
publish_date: publish_date extract_date path
|
||||
id: extract_id path
|
||||
} for path in *files]
|
||||
|
||||
add "index.html", title: "Catalin Mititiuc"
|
||||
add "blog.html", title: "Posts", target: "posts/index", template: "blog"
|
||||
|
||||
add "example.moon.md",
|
||||
template: "post"
|
||||
title: "MoonScript Example"
|
||||
publish_date: publish_date date true
|
||||
|
||||
add "code.md",
|
||||
template: "post"
|
||||
title: "Code Syntax Highlight Samples"
|
||||
publish_date: publish_date date true
|
||||
|
||||
add_all files_from "docs"
|
||||
add_all files_from "posts"
|
||||
|
||||
copy "app.css"
|
||||
copy "pygments.css"
|
||||
|
||||
Reference in New Issue
Block a user