passing relpermalink so after edit it goes straight to the published page..
This commit is contained in:
parent
0aec7aafde
commit
254dd21d51
4
app/c.js
4
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 {
|
||||
|
|
Loading…
Reference in New Issue