WIP: target
This commit is contained in:
parent
8ab3190009
commit
e878441819
15
site.moon
15
site.moon
@ -104,6 +104,11 @@ documents = (path=".") ->
|
|||||||
files = reverse get_files path
|
files = reverse get_files path
|
||||||
{join(path, file), target(file, "/posts") for file in *files}
|
{join(path, file), target(file, "/posts") for file in *files}
|
||||||
|
|
||||||
|
clean = (target) ->
|
||||||
|
dirty = extract_date target
|
||||||
|
escaped = dirty\gsub("%-", "%%-") .. "%-"
|
||||||
|
target\gsub(escaped, "")
|
||||||
|
|
||||||
sitegen.create =>
|
sitegen.create =>
|
||||||
@site_title = "WebDevCat.me"
|
@site_title = "WebDevCat.me"
|
||||||
@app_name = "stasis"
|
@app_name = "stasis"
|
||||||
@ -114,16 +119,8 @@ sitegen.create =>
|
|||||||
for path, target in pairs files
|
for path, target in pairs files
|
||||||
id = extract_id path
|
id = extract_id path
|
||||||
|
|
||||||
d = extract_date target
|
|
||||||
d = d\gsub("%-", "%%-") .. "%-"
|
|
||||||
p d
|
|
||||||
e = target\gsub(d, "")
|
|
||||||
p e
|
|
||||||
-- p target\gsub(extract_date(target), "")
|
|
||||||
|
|
||||||
add path,
|
add path,
|
||||||
target: e
|
target: clean(target)
|
||||||
-- target: target\gsub, "/%d%d%[.][%w%-]+$", id -- TODO reformat target
|
|
||||||
template: name
|
template: name
|
||||||
is_a: name
|
is_a: name
|
||||||
publish_date: publish_date path
|
publish_date: publish_date path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user