Files
blogger-nodejs/docs/CONFIG.md
DeaDvey bced9c7c0e 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 :)
2025-08-02 03:00:20 +01:00

4.8 KiB
Executable File

Configuration Documentation

Introduction

The configuration file is stored in a file called config.json, for an example, copy example-config.json to config.json (cp example-config.json config.json) and modify from there.
Currently all values in example-config.json are required, however I plan to add support for default values in the case of no value being set.
All options show an example configuartion value and the variable type + an explaination below it.

Technical configuration

  • "site_url": "https://example.com"
    This value defines the url of your site, this used for the RSS feed to link back to post.
  • "port": 8080
    Integer. This value defines the port that you run the blog on. Don't change this value if you don't know what that means.
  • "allow_signup": true
    Boolean. Defines weather new people should be allowed to signup.
  • "timeline_length": 20
    Integer. How many posts will be shown on the timeline (home page).
  • "enable_hitcount": true
    Boolean. Enabling the hitcount (a number that represents the amount of front page loads (stored in hitcount.txt)) can slightly slow down loading of the front page.
  • "charset": "UTF-8"
    String. This is the value in the tag in the html of all pages, you should not change this unless you know why.
  • "root_path": "/path/to/root/of/website" String. Anything in this directory will be in the webroot, so put favicon.ico and anything else here.

Basic Customisation

  • "seperator": "<hr/>"
    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"
    String. This is what %Y represents; it's the name of your instance, a human readable string.
  • "site_description": "Read my blogs!" String. This is what %W represents; it's the description of your instance, a human readable string.
  • "default_commenter_username": "Anon" String. Default commenter username if no username is inputted in comment submission.

Syndication

  • "rss": true
    Boolean. Enable or Disable RSS feeds.
  • "atom": true
    Boolean. Enable or Disable ATOM feeds.

Dates

Read more at date-fns

  • "date_format": "yyyy-MM-dd"
    String. The format of date's on the website.
  • "time_zone": "+0000"
    String. Your offset from UTC

Advanced Customisation

  • /views/* files are EJS files (used for formatting HTML) and can be editted to your liking, you might want to read the EJS docs for help.
  • "css": "body { background: red; }"
    String. Custom CSS to be applied to all pages, if you want more complex css, you can edit custom.css.
    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.