diff --git a/site.moon b/site.moon index 19714eb..f045148 100644 --- a/site.moon +++ b/site.moon @@ -79,16 +79,13 @@ list_posts = (args={}) => limit = math.min args.limit or #pages, #pages return for page in *pages[1, limit] - -- overwrite with our extension-less targets so that urls generated with - -- page\url_for! omit the file extension - page.target = page.meta.target { title: title, id: id, publish_date: date, blurb: blurb } = page.meta common.fill_ignoring_pre template, title: title or titleize_slug id publish_date: date blurb: blurb - url: page\url_for! + url: rootname page\url_for! -- call like this from a template: $(get_posts())[[
$title
]] -- or like this: $(get_posts({limit = 5}))[[$title
]] @@ -105,7 +102,7 @@ get_posts = (args={}) => title: title or titleize_slug id publish_date: date blurb: blurb - url: page\url_for! + url: rootname page\url_for! } -- replace '$if' helper function with cosmo's 'cif'