From d01ab609c1d18fe5f084b63422debf8506e0f163 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Tue, 20 May 2025 20:30:05 -0700 Subject: [PATCH] Wow --- blog.html | 9 ++++++++- index.html | 3 --- site.moon | 8 +++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/blog.html b/blog.html index ab3e0eb..fcdec80 100644 --- a/blog.html +++ b/blog.html @@ -1,3 +1,10 @@

Posts

-$list_posts +$(get_posts())[[ +
+

$post_title

+ — $blurb + Read post → +
+]] + diff --git a/index.html b/index.html index 8ed32af..8164f2a 100644 --- a/index.html +++ b/index.html @@ -6,9 +6,6 @@ $render{"templates/wares"}

Posts

-$({{go = "yeah"}})[[

$go! I can't believe this thing works!

]] -$(blah)[[$say, ]] -$blah[[

$say

]] $(get_posts({limit = 5}))[[

$post_title

diff --git a/site.moon b/site.moon index 68f9eb2..60f433b 100644 --- a/site.moon +++ b/site.moon @@ -97,7 +97,8 @@ list_posts = (page, args={}) -> get_posts = (args={}) => posts = @site\query_pages { is_a: "post" } table.sort posts, (a, b) -> a.source > b.source - for { meta: meta, source: source } in *posts[1, args.limit or #posts] + + return for { meta: meta, source: source } in *posts[1, args.limit or #posts] { target: meta.target post_title: meta.title or titleize_slug meta.id @@ -126,6 +127,10 @@ get_some = (args={}) => blurb: post.meta.blurb } for post in *posts[1, args.limit or #posts]] +get_something = (args={}, a) => + p a + {limit: "ok"} + sitegen.create => @site_title = "WebDevCat.me" @app_name = "stasis" @@ -133,6 +138,7 @@ sitegen.create => @list_posts = list_posts @get_posts = get_posts @get_some = get_some + @get_something = get_something add "index.html", title: "Catalin Mititiuc", blah: {{say: "wan"},{say: "tuu"}} add "blog.html", title: "Posts", target: "posts/index", template: "blog"