passing relpermalink so after edit it goes straight to the published page..

This commit is contained in:
Marcell Mars 2021-03-28 01:38:51 +01:00
parent 0aec7aafde
commit 254dd21d51
1 changed files with 2 additions and 2 deletions

View File

@ -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 {