Wow
This commit is contained in:
parent
1154bd5f54
commit
d01ab609c1
@ -1,3 +1,10 @@
|
|||||||
<h2>Posts</h2>
|
<h2>Posts</h2>
|
||||||
|
|
||||||
$list_posts
|
$(get_posts())[[
|
||||||
|
<section>
|
||||||
|
<h3><a href="$target">$post_title</a></h3>
|
||||||
|
<time>$publish_date</time> — $blurb
|
||||||
|
<a class="read-post-link" href="$target">Read post →</a>
|
||||||
|
</section>
|
||||||
|
]]
|
||||||
|
|
||||||
|
@ -6,9 +6,6 @@ $render{"templates/wares"}
|
|||||||
|
|
||||||
<h2>Posts</h2>
|
<h2>Posts</h2>
|
||||||
|
|
||||||
$({{go = "yeah"}})[[<p>$go! I can't believe this thing works!</p>]]
|
|
||||||
$(blah)[[$say, ]]
|
|
||||||
$blah[[<p>$say</p>]]
|
|
||||||
$(get_posts({limit = 5}))[[
|
$(get_posts({limit = 5}))[[
|
||||||
<section>
|
<section>
|
||||||
<h3><a href="$target">$post_title</a></h3>
|
<h3><a href="$target">$post_title</a></h3>
|
||||||
|
@ -97,7 +97,8 @@ list_posts = (page, args={}) ->
|
|||||||
get_posts = (args={}) =>
|
get_posts = (args={}) =>
|
||||||
posts = @site\query_pages { is_a: "post" }
|
posts = @site\query_pages { is_a: "post" }
|
||||||
table.sort posts, (a, b) -> a.source > b.source
|
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
|
target: meta.target
|
||||||
post_title: meta.title or titleize_slug meta.id
|
post_title: meta.title or titleize_slug meta.id
|
||||||
@ -126,6 +127,10 @@ get_some = (args={}) =>
|
|||||||
blurb: post.meta.blurb
|
blurb: post.meta.blurb
|
||||||
} for post in *posts[1, args.limit or #posts]]
|
} for post in *posts[1, args.limit or #posts]]
|
||||||
|
|
||||||
|
get_something = (args={}, a) =>
|
||||||
|
p a
|
||||||
|
{limit: "ok"}
|
||||||
|
|
||||||
sitegen.create =>
|
sitegen.create =>
|
||||||
@site_title = "WebDevCat.me"
|
@site_title = "WebDevCat.me"
|
||||||
@app_name = "stasis"
|
@app_name = "stasis"
|
||||||
@ -133,6 +138,7 @@ sitegen.create =>
|
|||||||
@list_posts = list_posts
|
@list_posts = list_posts
|
||||||
@get_posts = get_posts
|
@get_posts = get_posts
|
||||||
@get_some = get_some
|
@get_some = get_some
|
||||||
|
@get_something = get_something
|
||||||
|
|
||||||
add "index.html", title: "Catalin Mititiuc", blah: {{say: "wan"},{say: "tuu"}}
|
add "index.html", title: "Catalin Mititiuc", blah: {{say: "wan"},{say: "tuu"}}
|
||||||
add "blog.html", title: "Posts", target: "posts/index", template: "blog"
|
add "blog.html", title: "Posts", target: "posts/index", template: "blog"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user