2021-03-15 21:28:43 +00:00
# This is an example configuration for GoBlog
# Until there's an official release configuration may change
# Keep a look at the commit history
2022-03-10 13:52:56 +00:00
# Debug
debug : true # Enable more verbose logging
# Pprof - Option to enable pprof profiling
pprof :
enabled : true # Enable pprof profiling
address : ":6060" # Address to listen on
2021-03-15 21:28:43 +00:00
# Database
database :
file : data/db.sqlite # File for the SQLite database
2021-03-26 08:33:46 +00:00
dumpFile : data/db.sql # (Optional) File for database dump, will be executed hourly
2021-07-15 16:56:03 +00:00
debug : true # Enable if you want to see all the SQL statements
2021-03-15 21:28:43 +00:00
# Web server
server :
# Logging
logging : true # Log website access (time, path, status code, response size, referrer, user agent, but NO IP address)
logFile : data/access.log # File path for the access log (rotated, date will get appended)
# Addresses
port : 8080
publicAddress : https://example.com # Public address to use for the blog
shortPublicAddress : https://short.example.com # Optional short address, will redirect to main address
2021-08-02 18:43:24 +00:00
mediaAddress : https://media.example.com # Optional domain to use for serving media files
2021-03-15 21:28:43 +00:00
# Security
publicHttps : true # Use Let's Encrypt and serve site with HTTPS
2022-04-12 06:48:09 +00:00
# To use another ACME server like ZeroSSL, set the following
# acmeDir: https://acme.zerossl.com/v2/DV90
# acmeEabKid: "kid" # Key ID for the EAB key
# acmeEabKey: "key" # Key for the EAB key
2022-10-30 19:57:25 +00:00
httpsCert : /path/to/cert.crt # Path to TLS certificate
httpsKey : /path/to/key.key # Path to TLS key
httpsRedirect : true # Listen on port 80 and redirect to HTTPS on port 443, when HTTPS is configured and no custom port set, automatically enabled with publicHttps
securityHeaders : true # Set security HTTP headers, automatically enabled with publicHttps or httpsCert and httpsKey
2021-03-15 21:28:43 +00:00
cspDomains : # Specify additional domains to allow embedded content with enabled securityHeaders
- media.example.com
2021-03-19 09:10:47 +00:00
# Tor
tor : true # Publish onion service, requires Tor to be installed and available in path
2022-03-10 13:52:56 +00:00
torSingleHop : true # Enable single hop mode (non-anonymous)
2021-03-15 21:28:43 +00:00
# Cache
cache :
enable : true # Enable cache on some paths
expiration : 600 # Time in seconds for cache TTL
# Private mode
privateMode :
enabled : true # Enable private mode and only allow access with login
2022-01-24 08:43:06 +00:00
# IndexNow (https://www.indexnow.org/index)
indexNow :
enabled : true # Enable IndexNow integration
2021-03-15 21:28:43 +00:00
# User
user :
2022-11-27 14:06:43 +00:00
name : John Doe # Full name (only for inital, you can change this in the settings UI)
nick : johndoe # Username (only for inital, you can change this in the settings UI)
2021-03-15 21:28:43 +00:00
password : changeThisWeakPassword # Password for login
totp : HHUCH2SBOFXKKVCRJPVRS3W5MHX4FHXP # Optional for Two Factor Authentication; generate with "./GoBlog totp-secret"
appPasswords : # Optional passwords you can use with Basic Authentication
- username : app1
password : abcdef
link : https://example.net # Optional user link to use instead of homepage
email : contact@example.com # Email (only used in feeds)
identities : # Other identities to add to the HTML header with rel=me links
- https://micro.blog/exampleuser
# Hooks
hooks :
shell : /bin/bash # Shell to use to execute commands (default is /bin/bash)
hourly : # Commands to execute every full hour
- echo Hourly
prestart : # Commands to execute when starting
- echo Start
# Post hooks (you can use .URL (URL string) or .Post (post object) as text/template objects)
postpost : # Commands to execute after creating a new post
- echo Created new post at {{.URL}}
postupdate : # Commands to execute after updating a post
- echo Updated post at {{.URL}}
postdelete : # Commands to execute after deleting a post
- echo Deleted post at {{.URL}}
2022-01-03 12:55:44 +00:00
postundelete : # Commands to execute after undeleting a post
- echo Undeleted post at {{.URL}}
2021-03-15 21:28:43 +00:00
# ActivityPub
activityPub :
enabled : true # Enable ActivityPub
2021-07-29 13:31:49 +00:00
tagsTaxonomies : # Post taxonomies to use as "Hashtags"
- tags
2021-03-15 21:28:43 +00:00
2021-04-23 17:36:57 +00:00
# Webmention
webmention :
disableSending : true # Disable sending of webmentions (also happens when private mode enabled and external target)
disableReceiving : true # Disable receiving of webmentions, disables comments for all blogs, disables replies via ActivityPub
2021-03-15 21:28:43 +00:00
# MicroPub
micropub :
# Media configuration
mediaStorage :
2021-06-23 12:28:51 +00:00
mediaUrl : https://media.example.com # Define external media URL (instead of /m subpath for local files), required for BunnyCDN and FTP
2021-03-15 21:28:43 +00:00
# BunnyCDN storage (optional)
bunnyStorageKey : BUNNY-STORAGE-KEY # Secret key for BunnyCDN storage
bunnyStorageName : storagename # BunnyCDN storage name
2021-06-23 12:28:51 +00:00
bunnyStorageRegion : ny # required if BunnyCDN storage region isn't Falkenstein
# FTP storage (optional)
ftpAddress : ftp.example.com:21 # Host and port for FTP connection
ftpUser : ftpuser # Username of FTP user
ftpPassword : ftppassword # Password of FTP user
2021-04-21 18:10:32 +00:00
# Image compression (optional, you can define no, one or multiple services, disabled when private mode enabled)
2022-03-24 14:19:34 +00:00
tinifyKey : TINIFY-KEY # Secret key for the Tinify.com API
cloudflareCompressionEnabled : true # Use Cloudflare's compression
localCompressionEnabled : true # Use local compression
2021-03-15 21:28:43 +00:00
# MicroPub parameters (defaults already set, set to overwrite)
# You can set parameters via the UI of your MicroPub editor or via front matter in the content
categoryParam : tags
replyParam : replylink
2021-07-31 11:20:51 +00:00
replyTitleParam : replytitle
2022-12-26 08:23:52 +00:00
replyContextParam : replycontext
2021-03-15 21:28:43 +00:00
likeParam : likelink
2021-07-31 11:20:51 +00:00
likeTitleParam : liketitle
2022-12-26 08:23:52 +00:00
likeContextParam : likecontext
2021-03-15 21:28:43 +00:00
bookmarkParam : link
audioParam : audio
photoParam : images
photoDescriptionParam : imagealts
2021-07-31 11:20:51 +00:00
locationParam : location
2021-03-15 21:28:43 +00:00
# Notifications
notifications :
2021-12-29 06:09:42 +00:00
ntfy : # Receive notifications using Ntfy.sh
enabled : true # Enable it
2022-04-04 11:07:36 +00:00
topic : mynotificationstopic # The topic for the notifications
server : https://ntfy.sh # The server to use (default is https://ntfy.sh)
user : myusername # The username to use (optional)
2022-10-03 18:09:18 +00:00
pass : mypassword # The password to use (optional)
email : notifications@example.com # Email address for Ntfy Email Notifications (optional)
2021-03-15 21:28:43 +00:00
telegram : # Receive notifications via Telegram
2021-12-29 06:09:42 +00:00
enabled : true # Enable it
2021-03-15 21:28:43 +00:00
chatId : 123456 # Telegram chat ID (usually the user id on Telegram)
botToken : BOT-TOKEN # Telegram bot token
2023-01-05 05:48:31 +00:00
matrix : # Receive notifications via Matrix
enabled : true # Enable it
homeserver : https://matrix.org # The bot's homeserver
username : username # The bot's username
password : pass123 # The bot's password
room : "#myroom:matrix.org" # The Matrix chat room for the notifications
deviceid : TestBlogNotifications # A unique device ID (to not clutter your login sessions) (optional)
2021-03-15 21:28:43 +00:00
# Redirects
pathRedirects :
# Simple 302 redirect from /index.xml to .rss
- from : "\\/index\\.xml"
to : ".rss"
# Redirect using regular expressions
- from : "^\\/(writings|dev)\\/posts(.*)$"
to : "/$1$2"
type : 301 # custom redirect type
2021-11-22 15:36:17 +00:00
# Map tiles
mapTiles :
source : "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" # (Optional) URL to use for map tiles
attribution : "© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors" # (Optional) Attribution for map tiles
minZoom : 0 # (Optional) Minimum zoom level
maxZoom : 20 # (Optional) Maximum zoom level
2021-12-16 19:21:54 +00:00
# Text-to-Speech (not just using the browser API, but Google Cloud's TTS-API)
# If enabled, it will automatically generate a TTS audio file after publishing a public post that has a section as well
# It's possible to regenerate the audio at any time. That will also try and delete previously generated TTS audio files
tts :
enabled : true
googleApiKey : "xxxxxxxx"
2022-04-16 19:42:09 +00:00
# Reactions (see docs for more info)
reactions :
enabled : true # Enable reactions (default is false)
2021-03-15 21:28:43 +00:00
# Blogs
defaultBlog : en # Default blog (needed because you can define multiple blogs)
blogs :
en : # Blog code
path : / # Path of blog
lang : en # Language of blog
title : My awesome blog # Blog title
description : My awesome blog description # Blog description
pagination : 10 # Number of posts per page
# Taxonomies
taxonomies :
- name : tags # Code of taxonomy (used via post parameters)
title : Tags # Name
description : "**Tags** on this blog" # Description
# Menus
menus :
# Main menu
main :
items :
- title : Home # Title
link : / # Site-relative or absolute links
- title : Posts
link : /posts
- title : Contact
link : https://example.com/contact
# Footer menu
footer :
items :
- title : Imprint & Privacy Policy
link : https://example.com/legal
# Index page which shows all posts with photos
photos :
enabled : true # Enable
2021-07-15 16:56:03 +00:00
path : /photos # (Optional) Set a custom path (relative to blog path)
2021-03-15 21:28:43 +00:00
title : Photos # Title
description : Instead of using Instagram, I prefer uploading pictures to my blog. # Description
# Full text search
search :
enabled : true # Enable
title : Search # Title
2021-07-15 16:56:03 +00:00
path : /search # (Optional) Set a custom path (relative to blog path)
2021-03-15 21:28:43 +00:00
placeholder : Search on this blog # Description
# Page with blog statistics (posts per year)
blogStats :
enabled : true # Enable
2021-07-15 16:56:03 +00:00
path : /statistics # (Optional) Set a custom path (relative to blog path)
2021-03-15 21:28:43 +00:00
title : Statistics # Title
description : "Here are some statistics with the number of posts per year:" # Description
2021-05-08 19:22:48 +00:00
# Blogroll
blogroll :
enabled : true # Enable
2021-07-15 16:56:03 +00:00
path : /blogroll # (Optional) Set a custom path (relative to blog path)
2021-05-08 19:22:48 +00:00
title : Blogroll # Title
description : "I follow these blog:" # Description
opml : https://example.com/blogroll.opml # Required, URL to the OPML file
authHeader : X-Auth # Optional, header to use for OPML authentication
authValue : abc # Authentication value for OPML
categories : # Optional, allow only these categories
- Blogs
2021-03-15 21:28:43 +00:00
# Redirect to random post
randomPost :
enabled : true # Enable
path : /random # Path
2022-01-26 20:08:46 +00:00
# Redirect to archive of the current day in previous years
onThisDay :
enabled : true # Enable
path : /onthisday # Path
2021-03-15 21:28:43 +00:00
# Send notifications about new posts to Telegram channel
telegram :
enabled : true # Enable
chatId : "@telegram" # Chat ID, usually channel username
botToken : BOT-TOKEN # Telegram Bot Token
instantViewHash : INSTANT-VIEW-HASH # Use custom TG IV template
# Comments
comments :
2021-07-15 16:56:03 +00:00
enabled : true # Enable comments
# Map
map :
enabled : true # Enable the map feature (shows a map with all post locations)
2021-07-22 11:41:52 +00:00
path : /map # (Optional) Set a custom path (relative to blog path), default is /map
# Contact form
contact :
enabled : true # Enable a contact form
path : /contact # (Optional) Set a custom path (relative to blog path), default is /contact
2021-07-22 12:04:46 +00:00
title : "Contact me!" # (Optional) Title to show above the form
description : "Feel free to send me a message" # (Optional) Description to show above the form, supports markdown
privacyPolicy : "By submitting this form, I agree to the privacy policy." # (Optional) Require agreement to the privacy policy, supports markdown
2021-07-22 11:41:52 +00:00
smtpHost : smtp.example.com # SMTP host
smtpPort : 587 # (Optional) SMTP port, default is 587
smtpUser : mail@example.com # SMTP user
smtpPassword : secret # SMTP password
emailFrom : blog@example.com # Email sender
2021-09-09 06:26:35 +00:00
emailTo : mail@example.com # Email recipient
2021-11-08 15:27:33 +00:00
emailSubject : "New contact message" # (Optional) Email subject
2021-09-09 06:26:35 +00:00
# Announcement
announcement :
text : This is an **announcement**! # Can be markdown with links etc.