Add lucide icons and TOC toggle

This commit is contained in:
2026-05-30 02:26:49 +08:00
parent 22768b1c40
commit cf47e96b1a
6 changed files with 402 additions and 32 deletions
+2
View File
@@ -8,6 +8,7 @@ const { createRenderer, stripLeadingTitle } = require('./renderer');
const PUBLIC_DIR = path.join(__dirname, '..', 'public');
const BUILTIN_THEMES_DIR = path.join(PUBLIC_DIR, 'themes');
const LUCIDE_DIST_DIR = path.join(__dirname, '..', 'node_modules', 'lucide', 'dist', 'umd');
const PAGE_TEMPLATE_PATH = path.join(__dirname, '..', 'views', 'page.html');
const PAGE_TEMPLATE = fs.readFileSync(PAGE_TEMPLATE_PATH, 'utf-8');
@@ -192,6 +193,7 @@ function createServer(opts) {
// Serve webook public assets (CSS, JS)
app.use('/_webook', express.static(PUBLIC_DIR));
app.use('/_vendor/lucide', express.static(LUCIDE_DIST_DIR));
if (customTheme) {
app.use(customTheme.mountPath, express.static(customTheme.dir));