mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-08-31 22:36:23 +00:00
- Updated `getPostById` function to accept an optional authorization token. - Modified `PostPage` to retrieve the token from cookies and pass it to the API call. - Added smooth transition effects for background and text colors in `globals.css`. - Cleaned up imports and formatting in `blog-home.tsx`. - Refactored `blog-post.tsx` to use `MDXRemote` for rendering markdown content. - Introduced `blog-comment.tsx` and `blog-post-header.client.tsx` components for better structure. - Added a switch component for dark/light mode toggle in the navbar. - Updated `Post` model to include a description field.
42 lines
996 B
Plaintext
42 lines
996 B
Plaintext
# 后端所有环境变量及其示例
|
||
|
||
# Captcha settings 机器人挑战配置
|
||
# 开发模式下的直接通过验证码
|
||
CAPTCHA_DEV_PASSCODE=114514
|
||
# captcha类型,支持turnstile recaptcha hcaptcha,disable为禁用验证码
|
||
CAPTCHA_TYPE=turnstile
|
||
# captcha设置
|
||
CAPTCHA_SITE_SECRET=89dh29djha28dh
|
||
CAPTCHA_SECRET_KEY=89dh28912dh1289dh128d9d
|
||
|
||
# Database settings 数据库配置
|
||
# 数据库驱动,支持sqlite postgres
|
||
DB_DRIVER=sqlite
|
||
DB_NAME=blog
|
||
DB_PATH=./data/data.db
|
||
DB_HOST=postgres
|
||
DB_PORT=5432
|
||
DB_USER=blog
|
||
DB_PASSWORD=blog
|
||
# postgres数据库SSL模式
|
||
DB_SSLMODE=disable
|
||
|
||
# Email settings 邮件配置
|
||
EMAIL_ENABLED=false
|
||
EMAIL_USERNAME=xxx@bbb.com
|
||
EMAIL_PASSWORD=xxx
|
||
EMAIL_ADDRESS=xxx@bbb.com
|
||
EMAIL_HOST=smtp.xxx.com
|
||
EMAIL_PORT=465
|
||
EMAIL_SSL=true
|
||
|
||
# App settings 应用程序配置
|
||
LOG_LEVEL=debug
|
||
BASE_URL=https://blog.shenyu.moe
|
||
MAX_REQUEST_BODY_SIZE=1000000
|
||
MODE=prod
|
||
PORT=8888
|
||
PASSWORD_SALT=1234567890
|
||
JWT_SECRET=1234567890
|
||
TOKEN_DURATION=3600
|
||
REFRESH_TOKEN_DURATION=604800 |