First list and integer questions, spaces to tabs

This commit is contained in:
Will Boyd
2025-02-01 08:27:58 -05:00
parent cf338813f1
commit f6197d1d70
6 changed files with 84 additions and 55 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ export async function parseFilePromise(config) {
}
mergeImagesIntoPosts(images, posts);
populateFrontmatter(posts);
populateFrontmatter(posts, config);
return posts;
}
@@ -162,10 +162,10 @@ function mergeImagesIntoPosts(images, posts) {
});
}
function populateFrontmatter(posts) {
function populateFrontmatter(posts, config) {
posts.forEach(post => {
post.frontmatter = {};
settings.frontmatter_fields.forEach(field => {
config.frontmatterFields.forEach(field => {
const [key, alias] = field.split(':');
let frontmatterGetter = frontmatter['get' + key.replace(/^./, (match) => match.toUpperCase())];