fix: use showdown for markdown conversion

This commit is contained in:
thecodrr
2021-04-28 10:35:32 +05:00
parent 6bebf07913
commit e1036ae289
8 changed files with 269 additions and 37 deletions

View File

@@ -18,7 +18,7 @@ function generateMetaTags(metadata, createMetaTag) {
export function buildPage(
template,
createMetaTag,
{ metadata, title, content, createdOn, editedOn }
{ metadata, title, headline, content, createdOn, editedOn }
) {
let page = template;
@@ -29,6 +29,7 @@ export function buildPage(
);
page = page.replace(/{{title}}/g, title);
page = page.replace(/{{headline}}/g, headline);
page = page.replace(/{{content}}/g, content);
page = page.replace(/{{createdOn}}/g, formatDate(createdOn));
page = page.replace(/{{editedOn}}/g, formatDate(editedOn));

View File

@@ -5,11 +5,9 @@ const template = `<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta
name="description"
content="Notesnook is the most secure, zero-knowledge based, encrypted note-taking app all compiled into one simple to use package that works on all major platforms."
content="{{headline}}"
/>
<title>{{title}} - Notesnook</title>
<!-- DO NOT TOUCH THESE TAGS -->
{{metaTags}}
<title>{{title}} - Notesnook</title>
</head>
<body>
<h1>{{title}}</h1>

View File

@@ -1,10 +1,4 @@
const template = `[//]: <> (DO NOT TOUCH THESE META TAGS)
{{metaTags}}
[//]: <> (METADATA TAGS END)
# {{title}}
const template = `# {{title}}
{{content}}
---