diff --git a/index.js b/index.js
index c83353c..196caf7 100644
--- a/index.js
+++ b/index.js
@@ -41,7 +41,7 @@ function pageUpdate() {
var addedHTML = ""
var post = postsArray[i]
- addedHTML += `
`
+ addedHTML += ``
html += addedHTML
}
@@ -58,13 +58,14 @@ watcher
app.get('/post/:post*', (req, res) => {
var post = fs.readFileSync(path.join(postsPath, req.params.post)).toString()
+ var postName = req.params.post
post = mkthtml.makeHtml(post)
var html = fs.readFileSync(path.join(__dirname, 'resources/postPage.html')).toString()
html = html.replace('{POST}', post)
- html = html.replace('{POST_TITLE}', req.params.post.substring(3, req.params.post.length - 3))
+ html = html.replace('{POST_TITLE}', postName.substring(postName.indexOf("]") + 2, postName.length - 3))
res.send(html)
})
\ No newline at end of file