4.3 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.
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
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 that defines weather new people should be allowed to signup. - "timeline_length": 20
How many posts will be shown on the timeline (home page). - "enable_hitcount": true
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"
This is the value in the tag in the html of all pages, you should not change this unless you know why.
Basic Customisation
seperator = "
" site_name = "My Blog" site_description = "Read my blogs!"
// Anything in this directory will be in the webroot, so put favicon.ico and anything else here. root_path = "/path/to/root/of/website"
// Default username if no username is inputted in comment submission default_username = "Anon"
// RSS feeds rss = true rss_path = "/rss"
// Dates // https://date-fns.org/v4.1.0/docs/format date_format = "yyyy-MM-dd" time_zone = "+0000"
//// Format ///// // The syntax for this is pretty simple // %% - A literal % // %A - List of tags // %B - List of tags, each one with a hyperlink to that tag page // %C - Post content // %D - Published date in the format specified by date_format // %E - Edited date in the format specified by date_format // %F - Pretty name // %G - Tag name (used for the tag page only) // %H - Frontpage hit count // %I - User description // %L - URL Permanent link to the post // %M - comments // %N - the username of the user (poster) // %O - URL to edit this post // %P - URL to create a new post // %Q - URL to sign up // %R - Site wide RSS feed // %S - post seperator as defined by post_seperator // %T - Title // %U - URL the the user (poster) // %W - Site Description as defined by site_description // %X - Comment submission box // %Y - Site Name as defined by site_name // %Z - Attribution (to me) and source code link and license
timeline_header = `
%Y
%W
Create PostRSS Feed
Sign Up
Delete Account
Hit count: %H %S` user_page_header = `
%F's posts:
%I %S` tag_page_header = `Posts tagged: %G
%S` // --------------------------------------------- user_post_format = `%T
%C
%BPermalink
%X %M %S` post_page_format = `
%T
%C
%BBy %N
Edit Post
Posted: %D
Edited: %E %S %X %M %S` timeline_post_format = `
%T
%C
PermalinkBy %N %X %M %S` tag_post_format = `
%T
%C
%BPermalink
By %N %S` // ------------------------------------- site_wide_footer = `Site is ran by DeaDvey
%Z`
// Custom Strings signup_agreement = "I agree to not post illegal or hateful content" signups_unavailable = "Sorry, this server does not allow signups" user_exists = "Sorry, this user already exists, try a different username" user_doesnt_exist = "Sorry, this user does not exist" delete_account_confirmation = "I agree that my account and all of my posts will be permanently deleted instantly" incorrect_password = "Incorrect Password"
/// Custom CSS to be applied to every page
css = /* Put you custom CSS here, Read about existing classes and ID's in the docs (coming soon)*\
// pretty please don't change this attribution = "Powered by blogger-nodejs: Source Code, license (WTFPL)"