From f723e377320db807de1b6f6e74e1f01c1f0dc271 Mon Sep 17 00:00:00 2001 From: DeaDvey Date: Sat, 2 Aug 2025 02:48:22 +0100 Subject: [PATCH] docs and that --- README.md | 16 ++++++---------- docs/CONTRIBUTING.md | 1 + docs/DOCUMENTATION.md | 4 ++++ docs/EJS.md | 27 +++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 docs/CONTRIBUTING.md create mode 100644 docs/DOCUMENTATION.md create mode 100644 docs/EJS.md diff --git a/README.md b/README.md index 8462222..4411be4 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,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?... -TODO (not finished) -# EJS variable names -* config.variable_name - pass any variable in config.json -* hitcount - value in hitcount.txt (a single number) -## Posts (/views/posts/) -* post - an object that includes the data for that post, eg post.title, post.content etc -* user - the object of the user who posted this -* index - an int that refers to the index of the current post -## Comments (/views/partials/comment.ejs) -* comment - an object storing the comment, eg comment.name, comment.content +# Docs +See [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md) + +# 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/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000..6e6cf53 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1 @@ +Just open a PR or something, if it's good I'll pull diff --git a/docs/DOCUMENTATION.md b/docs/DOCUMENTATION.md new file mode 100644 index 0000000..61d4e60 --- /dev/null +++ b/docs/DOCUMENTATION.md @@ -0,0 +1,4 @@ +All documentation is under construction as the program is also under construction and so is constantly changing and is also a mess and I'm shit at documentation +- [EJS Variables and functions](EJS.md) +- [configuring config.json](CONFIG.md) +- [Contributing](CONTRIBUTING.md) diff --git a/docs/EJS.md b/docs/EJS.md new file mode 100644 index 0000000..af41d2f --- /dev/null +++ b/docs/EJS.md @@ -0,0 +1,27 @@ +This is not a guide on how EJS works, look at [EJS's website](https://ejs.co/) for that!
+This is just a list of functions and pieces of information provided to each EJS file.
+
+# syndication/global_rss: +- All config.json data +- All posts from posts.json +- showdown.JS's converter functions +- All functions in functions.js +# syndication/user_rss: +- All config.json data +- All posts from posts.json +- showdown.JS's converter functions +- All functions in functions.js +- the userID of the user in question (integer) +# syndication/global_atom: +- All config.json data +- All posts from posts.json +- showdown.JS's converter functions +- All functions in functions.js +- getUnixTime function from date-fns +# syndication/user_atom: +- All config.json data +- All posts from posts.json +- showdown.JS's converter functions +- All functions in functions.js +- the userID of the user in question (integer) +- getUnixTime function from date-fns