re-added markdown support under EJS

This commit is contained in:
2025-07-23 02:49:05 +01:00
parent 306adf3943
commit 40e0cc80a3
5 changed files with 8 additions and 5 deletions

View File

@@ -101,6 +101,7 @@ app.get("/", (req,res) => {
format,
getUnixTime,
func,
converter,
})
}); // /
app.get("/user/:username", (req, res) => {
@@ -118,6 +119,7 @@ app.get("/user/:username", (req, res) => {
format: format,
getUnixTime: getUnixTime,
func,
converter,
})
}); // /user/:username
app.get("/post/:post_index", (req, res) => {
@@ -133,6 +135,7 @@ app.get("/post/:post_index", (req, res) => {
format,
getUnixTime,
func,
converter,
})
}); // /post/:post_index
app.get("/tag/:tag", (req,res) => {
@@ -148,6 +151,7 @@ app.get("/tag/:tag", (req,res) => {
format: format,
getUnixTime: getUnixTime,
func,
converter,
})
}); // /tag/:tag

View File

@@ -1,11 +1,10 @@
<h1>
<%= post.title %>
</h1>
<%= post.content %><br/>
<%- converter.makeHtml(post.content) %><br/>
<i>
By <a href="/user/<%= user.username %>"><%= user.username %></a><br/>
</i>
<br/>
<%- func.hyperlink_tags(post.tags) %><br/>
<a href="<%= config.edit_post_base_url %>/<%= postID %>">Edit</a><br/>
<i>Published: <%= func.unix_time_to_date_format(post.pubdate) %></i><br/>

View File

@@ -1,7 +1,7 @@
<h3>
<%= post.title %>
</h3>
<%= post.content %><br/>
<%- converter.makeHtml(post.content) %><br/>
<a href="/post/<%- postID %>">Permalink</a><br/>
<%- func.hyperlink_tags(post.tags) %>

View File

@@ -1,7 +1,7 @@
<h3>
<%= post.title %>
</h3>
<%= post.content %><br/>
<%- converter.makeHtml(post.content) %><br/>
<a href="/post/<%- index %>">Permalink</a><br/>
<i>
By <a href="/user/<%= user.username %>"><%= user.username %></a><br/>

View File

@@ -1,7 +1,7 @@
<h3>
<%= post.title %>
</h3>
<%= post.content %><br/>
<%- converter.makeHtml(post.content) %><br/>
<a href="/post/<%- index %>">Permalink</a><br/>
<!-- Comment form -->