Skip to content

Commit

Permalink
Fix New Template feature
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNUSDS committed Mar 1, 2024
1 parent 60293eb commit 7b50224
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mdxcomponents/frontmatterUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ tags: [${tags}]

export const getYamlBlogHeader = (fields: BlogFrontMatterFields): string => {
const tags = '[' + fields.tags?.map(s => `'${s}'`).join(',') + ']';
const carousel_show = fields.carousel_show ? "true" : "false";
return `# Page template info (DO NOT EDIT)
layout: default
blog_page: true
Expand All @@ -95,13 +96,13 @@ carousel_image: ${fields.carousel_image}
# accessibility text for image
carousel_image_alt_text: "${fields.carousel_image_alt_text}"
# should show on news and blog page. ordered by date prefix in filename
carousel_show: ${fields.carousel_show ? "true" : "false"}
carousel_show: ${carousel_show}
# Blog detail page (Edit this)
title: "${fields.title}"
dateline_str: "${fields.date}"
readtime_str: "${fields.readtime_minutes}"
byline_str: author: "${fields.author}"
author: "${fields.author}"
permalink: ${fields.permalink}
basename: "${fields.basename}"
tags: [${tags}]
Expand Down

0 comments on commit 7b50224

Please sign in to comment.