WIP: target

This commit is contained in:
Catalin Constantin Mititiuc 2025-05-21 20:27:11 -07:00
parent 8ab3190009
commit e878441819

View File

@ -104,6 +104,11 @@ documents = (path=".") ->
files = reverse get_files path
{join(path, file), target(file, "/posts") for file in *files}
clean = (target) ->
dirty = extract_date target
escaped = dirty\gsub("%-", "%%-") .. "%-"
target\gsub(escaped, "")
sitegen.create =>
@site_title = "WebDevCat.me"
@app_name = "stasis"
@ -114,16 +119,8 @@ sitegen.create =>
for path, target in pairs files
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,
target: e
-- target: target\gsub, "/%d%d%[.][%w%-]+$", id -- TODO reformat target
target: clean(target)
template: name
is_a: name
publish_date: publish_date path