wip: testing remark; trying to downgrade some libs

This commit is contained in:
2024-05-09 22:31:01 +10:00
parent cbcf6a731b
commit 0ca7a97d26
4 changed files with 48 additions and 6 deletions

View File

@@ -1,13 +1,21 @@
import { promises as fsp } from 'fs'
import { readFile } from 'node:fs/promises';
export async function MarkPostString() {
let path = ""
if ('DUMMY_HTML_DIR' in process.env && typeof process.env.DUMMY_HTML_DIR === "string") {
path = process.env.DUMMY_HTML_DIR + "test1.md";
}
return await readFile(path, "utf-8")
}
export async function DummyPostString() {
let path = ""
if ('DUMMY_HTML_DIR' in process.env && typeof process.env.DUMMY_HTML_DIR === "string") {
path = process.env.DUMMY_HTML_DIR + "test1.html";
}
return await fsp.readFile(path, "utf-8")
return await readFile(path, "utf-8")
}
export async function DummyPostSlug() {
export function DummyPostSlug() {
return "dummy-post"
}