CONFIG.md documentation and also fixed a bug where when ATOM files are

loaded the config.rss boolean is actually checked as opposed to
config.atom, fixed by also adding string.atom_disabled to config.json :)
This commit is contained in:
2025-08-02 03:00:20 +01:00
parent f723e37732
commit bced9c7c0e
3 changed files with 18 additions and 10 deletions

View File

@@ -29,6 +29,7 @@
"delete_account_confirmation": "Delete my account - (I agree that my account and all of my posts will be permanently deleted instantly)",
"incorrect_password": "Incorrect Password",
"rss_disabled": "Sorry, RSS is disabled",
"atom_disabled": "Sorry, ATOM is disabled",
"attribution": "Powered by blogger-nodejs: <a href='https://git.javalsai.tuxcord.net/deadvey/blogger-nodejs'>Source Code</a>, <a href='https://git.javalsai.tuxcord.net/deadvey/blogger-nodejs/raw/branch/master/LICENSE'>license (WTFPL)</a>"
},
"css": ""

View File

@@ -33,8 +33,8 @@ All options show an example configuartion value and the variable type + an expla
## Syndication
* "rss": true<br/>
Boolean. Enable or Disable RSS feeds.
* "rss_path": "/rss"<br/>
String. The path of the global rss feed file.
* "atom": true<br/>
Boolean. Enable or Disable ATOM feeds.
## Dates
Read more at [date-fns](https://date-fns.org/v4.1.0/docs/format)<br/>
@@ -50,7 +50,7 @@ Read more at [date-fns](https://date-fns.org/v4.1.0/docs/format)<br/>
You can also edit the custom.css file in the webroot, as by default this is linked in the global header.
## Custom Strings
All of these values are of type String
All of these values are of type String and are in the "string" object.
* "signup_agreement": "I agree to not post illegal or hateful content"<br/>
The agreement people must check to signup for the server.
* "signups_unavailable": "Sorry, this server does not allow signups"<br/>
@@ -59,11 +59,18 @@ All of these values are of type String
The string to be shown when someone is trying to signup with a name exists.
* "user_doesnt_exist": "Sorry, this user does not exist"<br/>
The string to be shown when someone tries to edit their account or make a post but the username doesn't exist.
* "comment_doesnt_exist": "This comment doesn't exist, this could be because the post it was attached to was deleted"<br/>
String to be shown if someone goes to /comment/commentID but that comment doesnt exist (sometimes because the post it was attatched to was deleted)
* "post_doesnt_exist": "This post doesn't exist or was deleted"<br/>
Shown when someone goes to /post/postID but that post was deleted or doesn't exist.
* "delete_account_confirmation": "I agree that my account and all of my posts will be permanently deleted instantly"<br/>
The string to be shown as a confirmation when a user tries to delete their account.
* "incorrect_password": "Incorrect Password"<br/>
The string to be shown if the password is incorrect.
## Other
* "rss_disabled": "Sorry,·RSS·is·disabled"<br/>
String to be shown if an RSS file is loaded but RSS is disabled
* "atom_disabled": "Sorry, ATOM is disabled"<br/>
Same as above but ATOM
* "attribution" = "Powered by blogger-nodejs: <a href='https://git.javalsai.tuxcord.net/deadvey/blogger-nodejs'>Source Code</a>, <a href='https://git.javalsai.tuxcord.net/deadvey/blogger-nodejs/raw/branch/master/LICENSE'>license (WTFPL)</a>"
String. Represented by format indicator %Z. Only change this value if you modify the source code or just want to change some of the formatting.
Represented by format indicator %Z. Only change this value if you modify the source code or just want to change some of the formatting.

View File

@@ -101,9 +101,9 @@ app.get("/user/:username/rss", (req,res) => {
});
// global ATOM protocol gets
app.get("/atom", (req,res) => {
if (config.rss == false) {
if (config.atom == false) {
res.render("partials/message", {
message: config.string.rss_disabled,
message: config.string.atom_disabled,
config: config,
})
}
@@ -122,9 +122,9 @@ app.get("/atom", (req,res) => {
app.get("/user/:username/atom", (req,res) => {
const username = req.params.username;
const userID = func.get_userID(username);
if (config.rss == false) {
if (config.atom == false) {
res.render("partials/message", {
message: config.string.rss_disabled,
message: config.string.atom_disabled,
config: config,
})
}