Grateful to the #VanillaJS team for enabling my super-minimalist #CMS.
This is the idea:
https://monastic.neocities.org/
window.addEventListener("load", async (event) => {
const params = new URLSearchParams(document.location.search)
const filepath = params.get("c") ?? "index.md"
const filefetch = await fetch(filepath, {method: "GET", cache: "no-store"})
const markdown = await filefetch.text()
document.getElementById("content").innerHTML = marked.parse(markdown)
})