This commit is contained in:
parent
8fe844b11b
commit
7bfd3094ad
|
@ -65,6 +65,7 @@ if (argv[0] == "--dev") {
|
|||
{
|
||||
directoryListing: false,
|
||||
public: "src/web/",
|
||||
cleanUrls: false
|
||||
},
|
||||
{
|
||||
createReadStream(path, options) {
|
||||
|
|
|
@ -38,22 +38,28 @@
|
|||
<body>
|
||||
<h1> sophie's blog </h1>
|
||||
<a id="return_back" href="/blog.html" style="display:none;font-size:xx-large;">return back?</a>
|
||||
|
||||
<div>Scroll to bottom for comments ↓</div>
|
||||
<ul id="html_list" style="display: none">
|
||||
</ul>
|
||||
<div id="renderer"></div>
|
||||
<div style="color:red;font-size:larger;font-weight:bolder;display:none;" id="error">
|
||||
Blog post <span></span> does not exist.
|
||||
</div>
|
||||
<div class="giscus"></div>
|
||||
<script src="https://giscus.app/client.js" data-repo="fucksophie/blog_comments" data-repo-id="R_kgDOMY4cfw"
|
||||
data-category="General" data-category-id="DIC_kwDOMY4cf84ChCRR" data-mapping="url" data-strict="1"
|
||||
data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom" data-theme="noborder_dark"
|
||||
data-lang="en" data-loading="lazy" crossorigin="anonymous" async>
|
||||
</script>
|
||||
<script type="module">
|
||||
function parseMetadata(file) {
|
||||
const splitfile = file.split("\n");
|
||||
const properties = {};
|
||||
for (let i = 0; i < splitfile.length; i++) {
|
||||
const line = splitfile[i];
|
||||
if(/^=+$/gm.test(line)) break;
|
||||
if (/^=+$/gm.test(line)) break;
|
||||
const parts = line.split("=");
|
||||
if(parts.length !== 2) break;
|
||||
if (parts.length !== 2) break;
|
||||
properties[parts[0].trim()] = parts[1].trim();
|
||||
}
|
||||
return properties;
|
||||
|
|
Loading…
Reference in a new issue