refactor(配置): 更新代码块和主题相关配置

- 移除旧的highlight.js配置,改用新的code_blocks配置
- 添加snackbar弹窗、instantpage预加载和文本对齐配置
- 优化代码块主题和显示样式
This commit is contained in:
wenyongda 2026-04-14 12:52:10 +08:00
parent 0ba2caea01
commit 5a9ddf7918
2 changed files with 33 additions and 15 deletions

View File

@ -186,10 +186,31 @@ lazyload:
fancybox: true fancybox: true
# 代碼塊美化 # 代碼塊美化
code_word_wrap: true code_blocks:
# Code block theme: darker / pale night / light / ocean / false
theme: pale night
macStyle: true
# Code block height limit (unit: px)
height_limit: 200
word_wrap: true
# 高亮主題 # Toolbar
highlight_theme: mac copy: true
language: true
# true: shrink the code blocks | false: expand the code blocks | none: expand code blocks and hide the button
shrink: false
fullpage: trie
# Snackbar 彈窗
# https://github.com/polonel/SnackBar
# position 彈窗位置
# 可選 top-left / top-center / top-right / bottom-left / bottom-center / bottom-right
snackbar:
enable: true
position: bottom-left
bg_light: '#49b1f5' #light mode時彈窗背景
bg_dark: '#2d3035' #dark mode時彈窗背景
# Inject the css and script (aplayer/meting) # Inject the css and script (aplayer/meting)
@ -212,4 +233,11 @@ pjax:
# fab fa-github: https://github.com/xxxxx || Github # fab fa-github: https://github.com/xxxxx || Github
# fas fa-envelope: mailto:xxxxxx@gmail.com || Email # fas fa-envelope: mailto:xxxxxx@gmail.com || Email
wordcount: wordcount:
enable: true enable: true
# https://instant.page/
# prefetch (預加載)
instantpage: true
# Stretches the lines so that each line has equal width文字向兩側對齊對最後一行無效
text_align_justify: true

View File

@ -46,17 +46,7 @@ marked:
postAsset: true postAsset: true
relative_link: false relative_link: false
future: true future: true
syntax_highlighter: highlight.js
highlight:
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
prismjs:
preprocess: true
line_number: true
tab_replace: ''
# Home page setting # Home page setting
# path: Root path for your blogs index page. (default = '') # path: Root path for your blogs index page. (default = '')