WIP: page titles

This commit is contained in:
2025-06-16 20:18:05 -07:00
parent f001942c3e
commit 42e519d949
4 changed files with 21 additions and 7 deletions

View File

@@ -83,14 +83,25 @@ list_posts = (page, limit) ->
}
} for { meta: meta, source: source } in *posts[1, limit or #posts]]
cosmo = require "sitegen.cosmo"
html_renderer = require "sitegen.renderers.html"
html_renderer.cosmo_helpers.if = (args, has_block) => cosmo.cif args, has_block
html_renderer.cosmo_helpers.titleize = (slug) => html.build ->
titleize_slug(slug) if slug
sitegen.create =>
@site_title = "WebDevCat.me · Catalin Mititiuc"
@site_title = "WebDevCat.me"
@app_name = "stasis"
@version = "0.2.12"
@list_posts = list_posts
add "index.html"
add "blog.html", target: "posts/index", template: "blog"
add "index.html", title: "Catalin Mititiuc"
add "blog.html", title: "Posts", target: "posts/index", template: "blog"
add "about.html", some: {
{ one: "alpha", two: "beta" },
{ one: "A", two: "B" }
}, cif: cosmo.cif, math: math, x: 2
for path, target in pairs posts "docs"
id = extract_id path
@@ -101,7 +112,7 @@ sitegen.create =>
is_a: "post"
publish_date: publish_date path
id: id
titleize: (slug) -> html.build -> titleize_slug(slug)
-- titleize: (slug) -> html.build -> titleize_slug(slug)
-- replace post markdown yaml headers with moonscript headers
filter "docs", (body) =>