Change metadata format

This commit is contained in:
Jared He 2021-07-26 19:07:17 -04:00
parent cd40e3af16
commit f323bb3433
2 changed files with 7 additions and 7 deletions

View File

@ -82,11 +82,11 @@ const parseXML = (XML) => {
abstract = abstract.replace(/<br>/g, "\n");
}
const md = `---
name: "${title}"
short: "${short}"
date: new Date("${date.toString()}")
online: ${online}
location: "${location}"
name: "${title.replace(/"/g, '\\"')}"
short: "${short.replace(/"/g, '\\"')}"
date: "${date.toString().replace(/"/g, '\\"')}"
online: ${online}
location: "${location.replace(/"/g, '\\"')}"
---
${abstract}`;

View File

@ -48,8 +48,8 @@ const parseXML = (XML) => {
);
const md = `---
author: ${author}
date: new Date("${date}")
author: "${author.replace(/"/g, '\\"')}"
date: "${date.replace(/"/g, '\\"')}"
---
${content}`;