Added page indexes for comments, posts, users and pages overall, should

add one for tags but it might be inefficient as I don't store all tags
in an array or anything...
This commit is contained in:
2025-08-02 00:51:33 +01:00
parent 5f2aba0c2b
commit 8b9ddcf048
7 changed files with 115 additions and 0 deletions

View File

@@ -141,6 +141,34 @@ app.get("/user/:username/atom", (req,res) => {
};
});
///////////////////// Page index's ///////////////////////
app.get("/index/pages", (req,res) => {
res.render("indexes/all_pages", {
config,
posts,
users,
comments: comments.comments,
});
}); // /index/posts
app.get("/index/posts", (req,res) => {
res.render("indexes/posts", {
config,
posts,
});
}); // /index/posts
app.get("/index/users", (req,res) => {
res.render("indexes/users", {
config,
users,
});
}); // /index/posts
app.get("/index/comments", (req,res) => {
res.render("indexes/comments", {
config,
comments: comments.comments,
});
}); // /index/posts
///////////////////// Standard Pages //////////////////////
app.get("/", (req,res) => {