all repos — homestead @ 91fa16ebbc4bae704fbcce73d1ab9e1861d1c2e2

Code for my website

Tweak menu configuration structure

Alan Pearce
commit

91fa16ebbc4bae704fbcce73d1ab9e1861d1c2e2

parent

7706219e77b612ed19485b52e0dc0a50d852d64b

1 file changed, 3 insertions(+), 3 deletions(-)

jump to
M src/templates.tssrc/templates.ts
@@ -17,7 +17,7 @@ parent: cheerio.Cheerio<cheerio.AnyNode>,
child: cheerio.Cheerio<cheerio.AnyNode>, ) { parent.empty(); - for (const link of config.extra.main_menu) { + for (const link of config.menus.main) { parent.append(child.clone().attr("href", link.url).text(link.name)); } }
@@ -57,10 +57,10 @@ $("body").addClass("h-card");
$(".title").addClass("p-name").addClass("u-url"); $("#content").html(await marked.parse(file.content)); const $feed = $(".h-feed"); - const $tpl = $(".h-entry").remove(); + const $entry = $(".h-entry").remove(); for (const post of posts) { - const $post = $tpl.clone(); + const $post = $entry.clone(); $post.find(".p-name").text(post.title); $post.find(".u-url").attr("href", post.url); $post