feat(search): 引入拼音搜索

* add pinyin search

* style(highlight): keep theme-aware background

- restore theme-aware .highlight with --highlight-bg

- add highlight vars for light/dark

chore: load pinyin lib before script.js

- ensure pinyin-match.js loads before script.js to avoid runtime dependency issues

docs: add third-party notice for pinyin-match

- add placeholder notice; replace with upstream license after verification

---------

Co-authored-by: neo <neo@example.com>
Co-authored-by: Maintainer (PR Edit) <maintainer@local>
This commit is contained in:
nsnans
2025-10-14 03:49:17 +08:00
committed by GitHub
parent e5fc71aee8
commit 338d0304d1
6 changed files with 29 additions and 1 deletions

View File

@@ -877,6 +877,12 @@ function copyStaticFiles(config) {
console.error('Error copying style.css:', e);
}
try {
fs.copyFileSync('assets/pinyin-match.js', 'dist/pinyin-match.js');
} catch (e) {
console.error('Error copying pinyin-match.js:', e);
}
// 复制JavaScript文件
try {
fs.copyFileSync('src/script.js', 'dist/script.js');