11 lines
851 B
Markdown
11 lines
851 B
Markdown
# 项目长期记忆:Nginx-Fancyindex-Theme
|
||
|
||
## 部署约定
|
||
- 主题资源放在 nginx `root` 下的 `theme/`:`/theme/header.html`、`/theme/footer.html`、`/theme/css/styles.css`。
|
||
- 依赖第三方 `ngx-fancyindex` 模块;未编译则 `fancyindex` 指令报错。
|
||
- `fancyindex_ignore "theme"` 仅隐藏列表显示,不阻止对 `/theme/...` 的直接访问。
|
||
|
||
## 已知坑
|
||
- 搜索结果显示需手动构建表格行:不可依赖抓取到的 `tr.outerHTML` 直接插入新表格,否则会出现列缺失、链接错误、只显示文件名等问题。应提取 `{ name, full, isDir, size, date }` 结构化数据后重新渲染 4 列表格(Name / Size / Last modified / 空)。
|
||
- `header.html` 中 CSS 链接、目录路径清理、搜索递归均用前端 JS 实现,修改后刷新页面即可生效,无需 reload nginx。
|