From 0b25fb221b0d224804ffa2916843d0e51ce7d219 Mon Sep 17 00:00:00 2001 From: DeaDvey Date: Sat, 9 Aug 2025 20:53:57 +0100 Subject: [PATCH] Documentation --- README.md | 14 ++++++++------ docs/CONFIG.md | 27 +++------------------------ docs/INSTALLATION.md | 11 +++++++++++ 3 files changed, 22 insertions(+), 30 deletions(-) create mode 100644 docs/INSTALLATION.md diff --git a/README.md b/README.md index 4411be4..df25d0b 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,13 @@ beautiful and featureful blogging frontend, this isn't for you.
See the software in action: [deadvey.com](https://deadvey.com)
+# Installation and Running: +Read the [installation guide](/docs/INSTALLATION.md) -# Confiuration +# Confiuration: Read the [configuation guide](docs/CONFIG.md) for configuration help (in config.json) -# Features +# Features: * post creation, modification and deletion via frontend * user creation, modification and deletion via frontend * multi user @@ -25,11 +27,11 @@ Read the [configuation guide](docs/CONFIG.md) for configuration help (in config. * site wide custom CSS * Page indexes -# Bugs +# Bugs: * probably scales like shit * probably insecure as hell -# Planned features/todo list +# Planned features/todo list: * federation (looks tricky) * All strings (including in edit and post page) customisable * formatable custom strings @@ -40,9 +42,9 @@ Read the [configuation guide](docs/CONFIG.md) for configuration help (in config. * Make EJS modification more user friendly * API for returning posts, users, comments, tags other?... -# Docs +# Docs: See [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md) -# Customisation +# Customisation: Customisation of settings can be done via the config.json file (use example-config.json as an example) and see [the configuration guide](docs/CONFIG.md)
Additionaly, more complex configuration of the precise template of the whole site, can be done via [EJS](https://ejs.co/) (in /views) (see [the list of things variables and functions available in EJS](docs/EJS.md) (you will need to understand EJS syntax and JavaScript, to customise this (why did I use EJS? well I originally had this weird system of format indicators with percent (%) signs and stuff (like in unix's date (`date`)) but then I was told EJS is better and it sure is, though it is a bit harder to understand but MUCH more powerful!)) diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 07a43b2..807d988 100755 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -21,6 +21,8 @@ All options show an example configuartion value and the variable type + an expla String. Anything in this directory will be in the webroot, so put favicon.ico and anything else here. ## Basic Customisation +* "locale": en
+ String. Your locale, see [/locales](/locales) for a list of all locales (you can open a PR for a new translation too) * "seperator": "\
"
String. This is what %S represents in the formatting, this will go inbetween posts and generally to seperate out content on pages. * "site_name": "My Blog"
@@ -50,27 +52,4 @@ Read more at [date-fns](https://date-fns.org/v4.1.0/docs/format)
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 and are in the "string" object. -* "signup_agreement": "I agree to not post illegal or hateful content"
- The agreement people must check to signup for the server. -* "signups_unavailable": "Sorry, this server does not allow signups"
- The string to be displayed if the user tries to signup when signup's are disabled. -* "user_exists": "Sorry, this user already exists, try a different username"
- The string to be shown when someone is trying to signup with a name exists. -* "user_doesnt_exist": "Sorry, this user does not exist"
- 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"
- 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"
- 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"
- The string to be shown as a confirmation when a user tries to delete their account. -* "incorrect_password": "Incorrect Password"
- The string to be shown if the password is incorrect. -* "rss_disabled": "Sorry,·RSS·is·disabled"
- String to be shown if an RSS file is loaded but RSS is disabled -* "atom_disabled": "Sorry, ATOM is disabled"
- Same as above but ATOM -* "attribution" = "Powered by blogger-nodejs: Source Code, license (WTFPL)" - Represented by format indicator %Z. Only change this value if you modify the source code or just want to change some of the formatting. - +* You can edit all the strings on the site in /locales/.json diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md new file mode 100644 index 0000000..c40ef43 --- /dev/null +++ b/docs/INSTALLATION.md @@ -0,0 +1,11 @@ +# Installation +All you need to do is clone the git repository:
+```git clone https://git.javalsai.tuxcord.net/deadvey/blogger-nodejs.git```
+Then navigate to /src:
+```cd src```
+Then run the initialisation function:
+```node server.js --first-time```
+Then you should modify config.json in / to suit your needs.
+# Running +I would reccomend running the program in tmux so it does not stop running when you close the terminal window.
+I might add support for running in the background later.