diff --git a/README.md b/README.md
index 8a9bfb8..0df6e53 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,7 @@ In action on my website: [deadvey.com](https://deadvey.com)
* hitcount
* Markdown syntax in posts
* Commenting on posts
+* sign up and delete account
# Bugs
* probably scales like shit
@@ -20,8 +21,8 @@ In action on my website: [deadvey.com](https://deadvey.com)
# planned features/todo list
* atom
* federation (looks tricky)
-* sign up
* All strings (including in edit and post page) customisable
+ * formatable custom strings
* split code into files to tidy it up a bit
* inline comments and docs
* give each post a hard postID to prevent potential issues
@@ -38,6 +39,7 @@ In action on my website: [deadvey.com](https://deadvey.com)
* %G - Tag name (used for the tag page only)
* %H - Frontpage hit count
* %I - User description
+* %J - URL delete account
* %L - URL Permanent link to the post
* %M - comments
* %N - the username of the user (poster)
diff --git a/app.js b/app.js
index 7ce98b0..8f2e59d 100755
--- a/app.js
+++ b/app.js
@@ -152,14 +152,17 @@ function hyperlink_tags(tags) {
// See the readme format indicators section for a full list of format indicators
// This function replaces the format indicators in a template to the content they represent
// accepts the template (string),
-// the post index (int) as an optional paramter to indicate what post is to be used (for replacing things like content and titles)
+// the post index (int) as an optional paramter to indicate what post is to be used (for replacing things like content and titles of posts)
// the tag (strig) as an optional parameter to indicate what tag is being used (for /tag/:tag pages)
+// the user index (int) is an optional parameter to indicate what user is to be used (for replacng things like the header of the user page)
// returns the template with it's format indiactors replaced (string)
function replace_format_indicators(template, post_index=-1, tag_name="tag", user_index=-1) {
output_string = template // These should always be replaceable
.replaceAll("%%", "%")
+ .replaceAll("%J", "/delete_account")
.replaceAll("%P", "/post")
.replaceAll("%O", `/edit/${post_index}`)
+ .replaceAll("%Q", "/signup")
.replaceAll("%R", "/rss")
.replaceAll("%Y", config.site_name)
.replaceAll("%W", config.site_description)
@@ -357,6 +360,13 @@ app.get("/signup", (req,res) => {
console.log("Error, invalid value for allow_signup (bool)")
}
}); // /signup
+app.get("/delete_account", (req,res) => {
+ res.send(`