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

View File

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

View File

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

View File

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

View File

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