feat: add code block wrap and copy

This commit is contained in:
TianLun Song 2025-09-08 17:16:46 +08:00
parent 5cfe5bf20b
commit 1b06aa98c8
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,5 @@
/* Wrap lines in code blocks and allow copy button compatibility */
.md-typeset pre > code {
white-space: pre-wrap;
word-break: break-word;
}

View File

@ -55,6 +55,7 @@ theme:
logo: assets/logo.svg
favicon: assets/favicon.ico
features:
- content.code.copy # 代码块一键复制
- navigation.instant # 即时加载
- navigation.instant.prefetch # 即时预取
- navigation.instant.progress # 进度指示器
@ -69,6 +70,8 @@ theme:
- search.share # 搜索共享
icon:
repo: fontawesome/brands/github
extra_css:
- stylesheets/code.css
extra:
analytics:
provider: google