Clean up
This commit is contained in:
parent
b43b070221
commit
82433ff000
10
site.moon
10
site.moon
@ -105,7 +105,7 @@ html_renderer.cosmo_helpers.if = (args, has_block) => cosmo.cif args, has_block
|
|||||||
-- add a '$titleize' helper function
|
-- add a '$titleize' helper function
|
||||||
html_renderer.cosmo_helpers.titleize = (slug) => titleize_slug slug
|
html_renderer.cosmo_helpers.titleize = (slug) => titleize_slug slug
|
||||||
|
|
||||||
documents = (path=".") ->
|
files_from = (path=".") ->
|
||||||
[Path.join path, file for file in *reverse get_files path]
|
[Path.join path, file for file in *reverse get_files path]
|
||||||
|
|
||||||
sitegen.create =>
|
sitegen.create =>
|
||||||
@ -114,18 +114,18 @@ sitegen.create =>
|
|||||||
@version = "0.2.12"
|
@version = "0.2.12"
|
||||||
@list_posts = list_posts @, template
|
@list_posts = list_posts @, template
|
||||||
|
|
||||||
add_all = (name, files) ->
|
add_all = (files) ->
|
||||||
for path in *files
|
for path in *files
|
||||||
add path,
|
add path,
|
||||||
target: target(path, "/posts")
|
target: target(path, "/posts")
|
||||||
template: name
|
template: "post"
|
||||||
is_a: name
|
is_a: "post"
|
||||||
publish_date: publish_date path
|
publish_date: publish_date path
|
||||||
id: extract_id path
|
id: extract_id path
|
||||||
|
|
||||||
add "index.html", title: "Catalin Mititiuc"
|
add "index.html", title: "Catalin Mititiuc"
|
||||||
add "blog.html", title: "Posts", target: "posts/index", template: "blog"
|
add "blog.html", title: "Posts", target: "posts/index", template: "blog"
|
||||||
add_all "post", documents "docs"
|
add_all files_from "docs"
|
||||||
|
|
||||||
-- replace post markdown yaml headers with moonscript headers
|
-- replace post markdown yaml headers with moonscript headers
|
||||||
filter "docs", (body) =>
|
filter "docs", (body) =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user