-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
227 lines (171 loc) · 6.72 KB
/
.env.example
File metadata and controls
227 lines (171 loc) · 6.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# MarkGo Engine Configuration
# Copy this file to .env and customize for your blog
#
# For detailed configuration documentation, see: docs/configuration.md
# =============================================================================
# CORE CONFIGURATION
# =============================================================================
# Environment: development, production, test
ENVIRONMENT=development
# Server port (1-65535)
PORT=3000
# Base URL for your blog (used for RSS feeds, sitemaps, social metadata)
# Production: https://yourdomain.com
# Development: http://localhost:3000
BASE_URL=http://localhost:3000
# =============================================================================
# PATHS & DIRECTORIES
# =============================================================================
# Path to articles directory (relative or absolute)
ARTICLES_PATH=./articles
# Path to static assets directory
STATIC_PATH=./web/static
# Path to templates directory
TEMPLATES_PATH=./web/templates
# =============================================================================
# BLOG INFORMATION
# =============================================================================
# Basic blog metadata
BLOG_TITLE=Your Blog Title
BLOG_TAGLINE=Your short tagline
BLOG_DESCRIPTION=Your blog description goes here
BLOG_AUTHOR=Your Name
BLOG_AUTHOR_EMAIL=your.email@example.com
# Blog language (ISO 639-1 code, e.g., 'en', 'en-US')
BLOG_LANGUAGE=en
# Blog theme (default, dark, custom)
BLOG_THEME=default
# Blog style — controls CSS theme (ships: minimal; add custom themes to web/static/css/themes/)
BLOG_STYLE=minimal
# Number of posts to display per page (1-100)
BLOG_POSTS_PER_PAGE=10
# =============================================================================
# ABOUT PAGE
# =============================================================================
# All fields are optional — the about page adapts to what's configured.
# At minimum, BLOG_AUTHOR (above) is displayed.
# Avatar image path (relative to static dir, e.g. "img/avatar.jpg")
ABOUT_AVATAR=
# One-liner tagline displayed under your name
ABOUT_TAGLINE=
# Short bio in markdown (alternative to articles/about.md)
ABOUT_BIO=
# Location (e.g. "San Francisco, CA")
ABOUT_LOCATION=
# Social links (username or full URL)
ABOUT_GITHUB=
ABOUT_TWITTER=
ABOUT_LINKEDIN=
ABOUT_MASTODON=
ABOUT_WEBSITE=
# =============================================================================
# CACHE CONFIGURATION
# =============================================================================
# Cache time-to-live (Go duration: 1h, 30m, 24h)
CACHE_TTL=1h
# Maximum number of cached items (recommended: 1000-10000)
CACHE_MAX_SIZE=1000
# Cache cleanup interval (Go duration: 10m, 1h)
CACHE_CLEANUP_INTERVAL=10m
# =============================================================================
# EMAIL CONFIGURATION (Contact Form)
# =============================================================================
# SMTP server settings (leave empty to disable email)
EMAIL_HOST=
EMAIL_PORT=587
EMAIL_USERNAME=
EMAIL_PASSWORD=
EMAIL_FROM=noreply@yourdomain.com
EMAIL_TO=your.email@example.com
# Use SSL/TLS encryption (recommended: true)
EMAIL_USE_SSL=true
# =============================================================================
# RATE LIMITING & SECURITY
# =============================================================================
# General rate limiting (requests per window)
RATE_LIMIT_GENERAL_REQUESTS=100
RATE_LIMIT_GENERAL_WINDOW=900s
# Contact form rate limiting (more restrictive)
RATE_LIMIT_CONTACT_REQUESTS=5
RATE_LIMIT_CONTACT_WINDOW=3600s
# CORS Configuration
CORS_ALLOWED_ORIGINS=http://localhost:3000
CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS
CORS_ALLOWED_HEADERS=Origin,Content-Type,Accept,Authorization
# For production, use specific origins:
# CORS_ALLOWED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
# =============================================================================
# ADMIN INTERFACE
# =============================================================================
# Admin panel credentials (leave empty to disable admin interface)
ADMIN_USERNAME=
ADMIN_PASSWORD=
# Production note: Use strong credentials and consider disabling if not needed
# Sessions use cookie-based auth with 7-day expiry (cleared on server restart)
# =============================================================================
# SERVER TIMEOUTS
# =============================================================================
# HTTP server timeout settings (in duration format: 15s, 1m, etc.)
SERVER_READ_TIMEOUT=15s
SERVER_WRITE_TIMEOUT=15s
SERVER_IDLE_TIMEOUT=60s
# =============================================================================
# LOGGING CONFIGURATION
# =============================================================================
# Log level: debug, info, warn, error
LOG_LEVEL=info
# Log format: json, text
LOG_FORMAT=json
# Log output: stdout, stderr, file
LOG_OUTPUT=stdout
# Log file path (required if LOG_OUTPUT=file)
LOG_FILE=
# Log rotation settings (when using file output)
LOG_MAX_SIZE=100
LOG_MAX_BACKUPS=3
LOG_MAX_AGE=28
LOG_COMPRESS=true
# Add source file/line to logs (useful for debugging)
LOG_ADD_SOURCE=false
# Custom time format for text logs (Go time format)
LOG_TIME_FORMAT=2006-01-02T15:04:05Z07:00
# =============================================================================
# SEO CONFIGURATION
# =============================================================================
# Master SEO toggle
SEO_ENABLED=true
# Individual SEO feature toggles
SEO_SITEMAP_ENABLED=true
SEO_SCHEMA_ENABLED=true
SEO_OPEN_GRAPH_ENABLED=true
SEO_TWITTER_CARD_ENABLED=true
# Robots.txt configuration (comma-separated paths)
SEO_ROBOTS_ALLOWED=/
SEO_ROBOTS_DISALLOWED=/admin,/api
SEO_ROBOTS_CRAWL_DELAY=1
# Social media and verification
SEO_DEFAULT_IMAGE=
SEO_TWITTER_SITE=
SEO_TWITTER_CREATOR=
SEO_FACEBOOK_APP_ID=
SEO_GOOGLE_SITE_VERIFY=
SEO_BING_SITE_VERIFY=
# =============================================================================
# UPLOAD CONFIGURATION
# =============================================================================
# Path to upload directory (relative or absolute)
UPLOAD_PATH=./uploads
# Maximum upload file size in bytes (default: 10MB)
UPLOAD_MAX_SIZE=10485760
# =============================================================================
# PRODUCTION OPTIMIZATION TIPS
# =============================================================================
# For production deployment, consider:
# - Set ENVIRONMENT=production
# - Use HTTPS in BASE_URL
# - Increase CACHE_TTL to 24h
# - Set LOG_LEVEL=warn or error
# - Set LOG_OUTPUT=file with rotation
# - Configure specific CORS_ALLOWED_ORIGINS
# - Use strong ADMIN credentials or disable admin
# - Enable EMAIL configuration for contact form