blogger-nodejs/example-config.js
2025-07-15 01:29:38 +01:00

108 lines
3.1 KiB
JavaScript
Executable File

export const seperator = "<hr/>"
export const site_name = "My Blog"
export const site_url = "https://example.com"
export const port = 8080
export const allow_signup = false
export const site_description = "Read my blogs!"
export const timeline_length = 20
export const enable_hitcount = true // Can slow down page loading a bit
export const charset = "UTF-8" // Don't change unless you know why
// 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"
// Default username if no username is inputted in comment submission
export const default_username = "Anon"
// RSS feeds
export const rss = true
export const rss_path = "/rss"
// Dates
// https://date-fns.org/v4.1.0/docs/format
export const date_format = "yyyy-MM-dd"
export const 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
export const timeline_header = `<h1>%Y</h1>
<h2>%W</h2>
<a href="%P">Create Post</a><br/>
<a href="%R">RSS Feed</a><br/>
Hit count: %H
%S`
export const user_page_header = `<h1>%F's posts:</h1>
%I
%S`
export const tag_page_header = `<h1>Posts tagged: %G</h1>%S`
// ---------------------------------------------
export const user_post_format = `<h2>%T</h2>
<p>%C</p>
<i>%B</i><br/>
<a href="%L">Permalink</a><br/>
%X
%M
%S`
export const post_page_format = `<h1>%T</h1>
<p>%C</p>
<i>%B</i><br/>
<i>By <a href="%U">%N</a></i><br/>
<a href="%O">Edit Post</a><br/>
<i>Posted: %D</i><br/>
<i>Edited: %E</i>
%S
%X
%M
%S`
export const timeline_post_format = `<h3>%T</h3>
<p>%C</p>
<a href="%L">Permalink</a><br/>
<i>By <a href="%U">%N</a></i>
%X
%M
%S`
export const tag_post_format = `<h3>%T</h3>
<p>%C</p>
<i>%B</i><br/>
<a href="%L">Permalink</a><br/>
<i>By <a href="%U">%N</a></i>
%S`
// -------------------------------------
export const site_wide_footer = `Site is ran by DeaDvey<br/>
%Z`
/// Custom CSS to be applied to every page
export const css = `
/* Put you custom CSS here,
Read about existing classes and ID's in the docs (coming soon)*\
`
// 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>"