From 254dd21d51edb981dca65956437ffba893555990 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Sun, 28 Mar 2021 01:38:51 +0100 Subject: [PATCH] passing relpermalink so after edit it goes straight to the published page.. --- app/c.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/c.js b/app/c.js index 8106940..2f0a49c 100644 --- a/app/c.js +++ b/app/c.js @@ -5,7 +5,6 @@ function captureFrontMatterAndMarkdown() { for (const k of formData.keys()) { // draft, iscjklanguage are default implicit (false) params in hugo if (["draft", "iscjklanguage"].includes(k)){ - console.log(formData.get(k)) if (formData.get(k) === "true") { frontmatter += `${k}: true\n` } @@ -16,7 +15,8 @@ function captureFrontMatterAndMarkdown() { } else if (k == "relpath") { filepath = `${location.pathname.split('/public')[0]}/content/${formData.get(k)}` gitpath = `${location.pathname.split('/public')[0]}` - publishpath = `${gitpath}/public/${formData.get(k).replace(".md", "")}/index.html` + } else if (k == "relpermalink") { + publishpath = `${location.pathname.split('/public')[0]}/public${formData.get(k)}index.html` } else if (["protocol", "offline"].includes(k)) { continue } else {