Files
artalkjs/conf/artalk.example.yml
T

328 lines
8.0 KiB
YAML

# Listen host
host: "0.0.0.0"
# Listen port
port: 23366
# App Key (for generation of JWT)
app_key: ""
# Debug mode
debug: false
# Language (follow Unicode BCP 47) ["en", "zh-CN", "zh-TW", "jp"]
# -- see https://www.techonthenet.com/js/language_tags.php --
locale: "en"
# Timezone (follow IANA Time Zone Database)
# -- see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones --
timezone: "Asia/Shanghai"
# Default site name (create when app is first launched)
site_default: "Default Site"
# Login timeout (in seconds)
login_timeout: 259200
# Database
db:
# Database type ["sqlite", "mysql", "pgsql", "mssql"]
type: "sqlite"
# Database file (only for SQLite)
file: "./data/artalk.db"
# Table prefix (e.g. "atk_")
table_prefix: ""
# -- The following is not necessary for SQLite --
# Database name
name: "artalk"
# Host address
host: "localhost"
# Host port
port: 3306
# Database user
user: "root"
# Database password
password: ""
# Database charset
charset: "utf8mb4"
# Enable SSL mode
ssl: false
# Logging
log:
# Enable logging
enabled: true
# Log file path
filename: "./data/artalk.log"
# Cache
cache:
# Enable cache
enabled: false
# Cache type ["redis", "memcache", "builtin"]
type: "builtin"
# Cache expiration time (in minutes)
expires: 30
# Cache warm up (warm up cache when program starts)
warm_up: false
# -- The following is not necessary for `builtin` cache --
# Cache server address (e.g. "localhost:6379")
server: ""
# Redis config
redis:
# Connection type ["tcp", "unix"]
network: "tcp"
# Redis username
username: ""
# Redis password
password: ""
# Redis database number (e.g. 0)
db: 0
# Trusted domains
# -- e.g. ["https://artalk.example.com:23366"] add url of your site her --
trusted_domains: []
# SSL
ssl:
# Enable SSL
enabled: false
# Certificate file path
# (e.g. "/etc/letsencrypt/live/example.com/fullchain.pem")
cert_path: ""
# Key file path
# (e.g. "/etc/letsencrypt/live/example.com/privkey.pem")
key_path: ""
# Moderator
# -- Comment examination before being public --
moderator:
# Default pending (new comments need to be approved by admin)
pending_default: false
# Block when API request fails (set to false to let comments pass when API request fails)
api_fail_block: false
# Akismet Key
# (Akismet anti-spam service, https://akismet.com)
akismet_key: ""
# Tencent Cloud Content Security
# (Auto review comments with Tencent Cloud Content Security)
# -- see https://cloud.tencent.com/document/product/1124/64508 --
tencent:
enabled: false
secret_id: ""
secret_key: ""
region: "ap-guangzhou"
# Aliyun Content Security
# (Auto review comments with Aliyun Content Security)
# -- see https://help.aliyun.com/document_detail/28417.html --
aliyun:
enabled: false
access_key_id: ""
access_key_secret: ""
region: "cn-shanghai"
# Keyword filter (local offline dictionary)
keywords:
# Enable keyword filter
enabled: false
# Set to pending when match
pending: false
# Dictionary file (support multiple dictionary files)
files:
- "./data/keywords_1.txt"
file_sep: "\n"
replac_to: "x"
# Captcha
captcha:
# Enable captcha
enabled: true
# Captcha is required always
always: false
# Captcha type ["image", "turnstile", "recaptcha", "hcaptcha", "geetest"]
captcha_type: "image"
# Action limit
# (the number of actions required to activate captcha)
action_limit: 3
# Reset Timeout (timeout to reset action counter. unit: s, set to -1 to disable)
action_reset: 60
# Turnstile
# (https://www.cloudflare.com/products/turnstile/)
turnstile:
site_key: ""
secret_key: ""
# reCaptcha
# (https://www.google.com/recaptcha/about/)
recaptcha:
site_key: ""
secret_key: ""
# hCaptcha (https://www.hcaptcha.com/)
hcaptcha:
site_key: ""
secret_key: ""
# Geetest (https://www.geetest.com)
geetest:
captcha_id: ""
captcha_key: ""
# Upload
img_upload:
# Enable image upload
enabled: true
# Image storage
path: "./data/artalk-img/"
# Image size limit (unit: MB)
max_size: 5
# Image link base path (default: "/static/images/")
public_path: null
# Upgit config
upgit:
# Enable Upgit
enabled: false
# Command line arguments
exec: "./upgit -c UPGIT_CONF_FILE_PATH -t /artalk-img"
# Delete local image after upload success
del_local: true
# Email
email:
# Enable email notification
enabled: false
# Send method ["smtp", "ali_dm", "sendmail"]
send_type: "smtp"
# Nick name of sender
send_name: "{{reply_nick}}"
# Email address of sender
send_addr: "noreply@example.com"
# Email subject
mail_subject: "[{{site_name}}] You got a reply from @{{reply_nick}}"
# Email template file (set to file path to use custom template)
mail_tpl: "default"
# SMTP send (set send method to "smtp" to enable)
smtp:
# Email address of sender
host: "smtp.qq.com"
# Email port
port: 587
# Email address of sender
username: "example@qq.com"
# Password
password: ""
# Aliyun mail push
# (set send method to "ali_dm" to enable; see: https://help.aliyun.com/document_detail/29444.html)
ali_dm:
access_key_id: ""
access_key_secret: ""
account_name: "noreply@example.com"
# Multi-push
admin_notify:
# Notification template (set to file path to use custom template)
notify_tpl: "default"
# Noise mode
# -- noise_mode is disabled by default. --
# -- When this option is set to `false`, only messages sent to the administrator will be notified, --
# -- such as "user A" replies to "user B", the communication between these two users will not be notified to the administrator. --
noise_mode: false
# Notify admin
email:
# Enable (can be disabled when using other push methods)
enabled: true
# Email subject (email subject sent to admin)
mail_subject: '[{{site_name}}] Post "{{page_title}}" has new a comment'
# Admin email template file (set to file path to use custom template)
mail_tpl: ""
# Telegram
telegram:
enabled: false
api_token: ""
receivers:
- 7777777
# Bark
bark:
enabled: false
server: "http://day.app/xxxxxxx/"
lark:
enabled: false
webhook_url: ""
# WebHook
webhook:
enabled: false
url: ""
ding_talk:
enabled: false
token: ""
secret: ""
# Slack
slack:
enabled: false
oauth_token: ""
receivers:
- "CHANNEL_ID"
# LINE
line:
enabled: false
channel_secret: ""
channel_access_token: ""
receivers:
- "USER_ID_1"
- "GROUP_ID_1"
# UI Settings
frontend:
# Comment box placeholder
placeholder: ""
# Text to display when there is
noComment: ""
# Text of the send button
sendBtn: ""
# Movable comment box
editorTravel: true
# Emoticons
emoticons: "https://cdn.jsdelivr.net/gh/ArtalkJS/Emoticons/grps/default.json"
# Vote button
vote: true
# Dislike button
voteDown: false
# User UA badge
uaBadge: false
# Comment sorting
listSort: true
# Page PV binding element
pvEl: "#ArtalkPV"
# Comment count binding element
countEl: "#ArtalkCount"
# Editor real-time preview
preview: true
# Flatten mode ["auto", true, false]
flatMode: "auto"
# Maximum nesting level
nestMax: 2
# Nesting comment sorting rules ["DATE_ASC", "DATE_DESC", "VOTE_UP_DESC"]
nestSort: DATE_ASC
# Gravatar
gravatar:
# API URL
mirror: "https://www.gravatar.com/avatar/"
# API parameters
params: "d=mp&s=240"
# Comment pagination
pagination:
# Number of comments per page
pageSize: 20
# Load more mode (disabled to use pagination bar)
readMore: true
# Scroll loading
autoLoad: true
# Content height limit
heightLimit:
# Comment content height limit (unit: px)
content: 300
# Sub-comment area height limit (unit: px)
children: 400
# Scrollable (scrollable height limit area)
scrollable: false
# Request timeout (unit: ms)
reqTimeout: 15000
# Version check
versionCheck: true