From 5a9ddf79186668be4d9e07c482845cec30854d88 Mon Sep 17 00:00:00 2001 From: wenyongda Date: Tue, 14 Apr 2026 12:52:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E9=85=8D=E7=BD=AE):=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BB=A3=E7=A0=81=E5=9D=97=E5=92=8C=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除旧的highlight.js配置,改用新的code_blocks配置 - 添加snackbar弹窗、instantpage预加载和文本对齐配置 - 优化代码块主题和显示样式 --- _config.butterfly.yml | 36 ++++++++++++++++++++++++++++++++---- _config.yml | 12 +----------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/_config.butterfly.yml b/_config.butterfly.yml index 8c0068c..5de87e4 100644 --- a/_config.butterfly.yml +++ b/_config.butterfly.yml @@ -186,10 +186,31 @@ lazyload: 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 -# 高亮主題 -highlight_theme: mac + # Toolbar + 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) @@ -212,4 +233,11 @@ pjax: # fab fa-github: https://github.com/xxxxx || Github # fas fa-envelope: mailto:xxxxxx@gmail.com || Email wordcount: - enable: true \ No newline at end of file + enable: true + +# https://instant.page/ +# prefetch (預加載) +instantpage: true + +# Stretches the lines so that each line has equal width(文字向兩側對齊,對最後一行無效) +text_align_justify: true \ No newline at end of file diff --git a/_config.yml b/_config.yml index 4ea3d08..a544cdc 100644 --- a/_config.yml +++ b/_config.yml @@ -46,17 +46,7 @@ marked: postAsset: true relative_link: false 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 # path: Root path for your blogs index page. (default = '')