chore: 把 deploy/ 与 data/ 移出版本库

- .gitignore 改为整目录忽略 /data/ 与 /deploy/(原先用 /data/* + 白名单,
  反而把 data/.htaccess、data/index.html 放进仓库)
- git rm --cached 移除 data/.htaccess、data/index.html、
  deploy/setup-simplenav-user.sh、deploy/nginx-simplenav-deny-data.conf
- 部署脚本移到 ~/code/_tooling/simplenav-deploy/,不再属于应用源码
- /data/ 的保护由站点根 .htaccess(RewriteRule ^data/ - [F,L])负责;
  nav.db 从未被提交,无凭据泄露
This commit is contained in:
2026-09-28 16:18:09 +08:00
parent 6e83cc3ecc
commit b4b81ec45e
5 changed files with 12 additions and 149 deletions
+12 -4
View File
@@ -1,10 +1,18 @@
# 运行时数据(数据库与抓取的图标不纳入版本库)
/data/*
!/data/.htaccess
!/data/index.html
# ---------------------------------------------------------------------------
# 运行时数据(绝不入库)
# data/ —— SQLite 数据库等敏感数据
# uploads/icons/* —— 抓取/上传的网站图标
# ---------------------------------------------------------------------------
/data/
/uploads/icons/*
!/uploads/icons/.gitkeep
# ---------------------------------------------------------------------------
# 部署脚本(与具体服务器、账号、路径绑定)
# 统一放在 ~/code/_tooling/ 下,不属于应用源码,不入库
# ---------------------------------------------------------------------------
/deploy/
# 杂项
*.db
*.log