CONFIG.md
This commit is contained in:
76
CONFIG.md
76
CONFIG.md
@@ -1,27 +1,41 @@
|
|||||||
export const seperator = "<hr/>"
|
# Configuration Documentation
|
||||||
export const site_name = "My Blog"
|
## Introduction
|
||||||
export const site_url = "https://example.com"
|
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.<br/>
|
||||||
export const port = 8080
|
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.
|
||||||
export const allow_signup = true
|
|
||||||
export const site_description = "Read my blogs!"
|
## Technical configuration
|
||||||
export const timeline_length = 20
|
* "site_url": "https://example.com"<br/>
|
||||||
export const enable_hitcount = true // Can slow down page loading a bit
|
This value defines the url of your site, this used for the RSS feed to link back to post.
|
||||||
export const charset = "UTF-8" // Don't change unless you know why
|
* "port": 8080<br/>
|
||||||
|
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<br/>
|
||||||
|
Boolean that defines weather new people should be allowed to signup.
|
||||||
|
* "timeline_length": 20<br/>
|
||||||
|
How many posts will be shown on the timeline (home page).
|
||||||
|
* "enable_hitcount": true<br/>
|
||||||
|
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"<br/>
|
||||||
|
This is the value in the <meta charset=""> tag in the html of all pages, you should not change this unless you know why.
|
||||||
|
|
||||||
|
## Basic Customisation
|
||||||
|
seperator = "<hr/>"
|
||||||
|
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.
|
// Anything in this directory will be in the webroot, so put favicon.ico and anything else here.
|
||||||
export const root_path = "/path/to/root/of/website"
|
root_path = "/path/to/root/of/website"
|
||||||
|
|
||||||
// Default username if no username is inputted in comment submission
|
// Default username if no username is inputted in comment submission
|
||||||
export const default_username = "Anon"
|
default_username = "Anon"
|
||||||
|
|
||||||
// RSS feeds
|
// RSS feeds
|
||||||
export const rss = true
|
rss = true
|
||||||
export const rss_path = "/rss"
|
rss_path = "/rss"
|
||||||
|
|
||||||
// Dates
|
// Dates
|
||||||
// https://date-fns.org/v4.1.0/docs/format
|
// https://date-fns.org/v4.1.0/docs/format
|
||||||
export const date_format = "yyyy-MM-dd"
|
date_format = "yyyy-MM-dd"
|
||||||
export const time_zone = "+0000"
|
time_zone = "+0000"
|
||||||
|
|
||||||
//// Format /////
|
//// Format /////
|
||||||
// The syntax for this is pretty simple
|
// The syntax for this is pretty simple
|
||||||
@@ -50,7 +64,7 @@ export const time_zone = "+0000"
|
|||||||
// %Y - Site Name as defined by site_name
|
// %Y - Site Name as defined by site_name
|
||||||
// %Z - Attribution (to me) and source code link and license
|
// %Z - Attribution (to me) and source code link and license
|
||||||
|
|
||||||
export const timeline_header = `<h1>%Y</h1>
|
timeline_header = `<h1>%Y</h1>
|
||||||
<h2>%W</h2>
|
<h2>%W</h2>
|
||||||
<a href="%P">Create Post</a><br/>
|
<a href="%P">Create Post</a><br/>
|
||||||
<a href="%R">RSS Feed</a><br/>
|
<a href="%R">RSS Feed</a><br/>
|
||||||
@@ -58,19 +72,19 @@ export const timeline_header = `<h1>%Y</h1>
|
|||||||
<a href="%D">Delete Account</a><br/>
|
<a href="%D">Delete Account</a><br/>
|
||||||
Hit count: %H
|
Hit count: %H
|
||||||
%S`
|
%S`
|
||||||
export const user_page_header = `<h1>%F's posts:</h1>
|
user_page_header = `<h1>%F's posts:</h1>
|
||||||
%I
|
%I
|
||||||
%S`
|
%S`
|
||||||
export const tag_page_header = `<h1>Posts tagged: %G</h1>%S`
|
tag_page_header = `<h1>Posts tagged: %G</h1>%S`
|
||||||
// ---------------------------------------------
|
// ---------------------------------------------
|
||||||
export const user_post_format = `<h2>%T</h2>
|
user_post_format = `<h2>%T</h2>
|
||||||
<p>%C</p>
|
<p>%C</p>
|
||||||
<i>%B</i><br/>
|
<i>%B</i><br/>
|
||||||
<a href="%L">Permalink</a><br/>
|
<a href="%L">Permalink</a><br/>
|
||||||
%X
|
%X
|
||||||
%M
|
%M
|
||||||
%S`
|
%S`
|
||||||
export const post_page_format = `<h1>%T</h1>
|
post_page_format = `<h1>%T</h1>
|
||||||
<p>%C</p>
|
<p>%C</p>
|
||||||
<i>%B</i><br/>
|
<i>%B</i><br/>
|
||||||
<i>By <a href="%U">%N</a></i><br/>
|
<i>By <a href="%U">%N</a></i><br/>
|
||||||
@@ -81,36 +95,36 @@ export const post_page_format = `<h1>%T</h1>
|
|||||||
%X
|
%X
|
||||||
%M
|
%M
|
||||||
%S`
|
%S`
|
||||||
export const timeline_post_format = `<h3>%T</h3>
|
timeline_post_format = `<h3>%T</h3>
|
||||||
<p>%C</p>
|
<p>%C</p>
|
||||||
<a href="%L">Permalink</a><br/>
|
<a href="%L">Permalink</a><br/>
|
||||||
<i>By <a href="%U">%N</a></i>
|
<i>By <a href="%U">%N</a></i>
|
||||||
%X
|
%X
|
||||||
%M
|
%M
|
||||||
%S`
|
%S`
|
||||||
export const tag_post_format = `<h3>%T</h3>
|
tag_post_format = `<h3>%T</h3>
|
||||||
<p>%C</p>
|
<p>%C</p>
|
||||||
<i>%B</i><br/>
|
<i>%B</i><br/>
|
||||||
<a href="%L">Permalink</a><br/>
|
<a href="%L">Permalink</a><br/>
|
||||||
<i>By <a href="%U">%N</a></i>
|
<i>By <a href="%U">%N</a></i>
|
||||||
%S`
|
%S`
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
export const site_wide_footer = `Site is ran by DeaDvey<br/>
|
site_wide_footer = `Site is ran by DeaDvey<br/>
|
||||||
%Z`
|
%Z`
|
||||||
|
|
||||||
// Custom Strings
|
// Custom Strings
|
||||||
export const signup_agreement = "I agree to not post illegal or hateful content"
|
signup_agreement = "I agree to not post illegal or hateful content"
|
||||||
export const signups_unavailable = "Sorry, this server does not allow signups"
|
signups_unavailable = "Sorry, this server does not allow signups"
|
||||||
export const user_exists = "Sorry, this user already exists, try a different username"
|
user_exists = "Sorry, this user already exists, try a different username"
|
||||||
export const user_doesnt_exist = "Sorry, this user does not exist"
|
user_doesnt_exist = "Sorry, this user does not exist"
|
||||||
export const delete_account_confirmation = "I agree that my account and all of my posts will be permanently deleted instantly"
|
delete_account_confirmation = "I agree that my account and all of my posts will be permanently deleted instantly"
|
||||||
export const incorrect_password = "Incorrect Password"
|
incorrect_password = "Incorrect Password"
|
||||||
|
|
||||||
/// Custom CSS to be applied to every page
|
/// Custom CSS to be applied to every page
|
||||||
export const css = `
|
css = `
|
||||||
/* Put you custom CSS here,
|
/* Put you custom CSS here,
|
||||||
Read about existing classes and ID's in the docs (coming soon)*\
|
Read about existing classes and ID's in the docs (coming soon)*\
|
||||||
`
|
`
|
||||||
|
|
||||||
// pretty please don't change this
|
// pretty please don't change this
|
||||||
export const 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>"
|
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>"
|
||||||
|
@@ -2,6 +2,9 @@ This is a blogging site written in nodejs, all pages are served directly by the
|
|||||||
Please don't use this yet, it's not finished<br/>
|
Please don't use this yet, it's not finished<br/>
|
||||||
In action on my website: [deadvey.com](https://deadvey.com)<br/>
|
In action on my website: [deadvey.com](https://deadvey.com)<br/>
|
||||||
|
|
||||||
|
# Confiuration
|
||||||
|
Read the (configuation guide)[CONFIG.md] for configuration help (in config.json)
|
||||||
|
|
||||||
# features
|
# features
|
||||||
* post creation via the web frontend (no need to remote to your server to make a post)
|
* post creation via the web frontend (no need to remote to your server to make a post)
|
||||||
* multi user
|
* multi user
|
||||||
|
Reference in New Issue
Block a user