feat: 页面模板差异化改进 + 配置优化 + 兼容清理 (#29)

- 首页判定:navigation 第一项
- 模板:page/projects/articles/bookmarks/search-results
- bookmarks:update: YYYY-MM-DD | from: git|mtime
- articles:RSS 聚合只读条目 + 分类聚合 + 影子写回结构
- projects:repo 卡片 + 可选热力图 + 自动抓取元信息
- 工作流:构建前 sync + schedule 定时刷新
- 移除兼容:config.yml/config.yaml、navigation.yml、home 特例
- 迁移说明:config/update-instructions.md
This commit is contained in:
rbetree
2025-12-28 00:22:54 +08:00
committed by GitHub
parent 1475a8a0d3
commit 387cd2492e
35 changed files with 2927 additions and 851 deletions

View File

@@ -4,6 +4,9 @@ on:
push:
branches: [ main ]
workflow_dispatch:
schedule:
# 定时刷新 RSS / projects 仓库元信息GitHub Actions 的 cron 使用 UTC 时区)
- cron: '0 2 * * *'
# 设置GITHUB_TOKEN的权限
permissions:
@@ -34,7 +37,7 @@ jobs:
cache: 'npm'
- name: Install dependencies
run: npm install
run: npm ci
# --- 书签处理步骤 ---
- name: Check for bookmark HTML files
@@ -109,14 +112,6 @@ jobs:
fi
fi
# Also check for legacy navigation file changes
if [ -f config/user/navigation.yml ]; then
if ! git diff --quiet config/user/navigation.yml; then
echo "config/user/navigation.yml has changes, committing..."
git add config/user/navigation.yml
git commit -m "Update navigation to include bookmarks page"
fi
fi
else
echo "ERROR: config/user/pages/bookmarks.yml does not exist! Bookmark processing may have failed."
echo "Current directory contents:"
@@ -181,8 +176,18 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# --- 网站构建和部署步骤 ---
- name: Generate site
run: npm run generate
# 同步时效性数据best-effortprojects 仓库信息、articles RSS 聚合
# 说明:
# - 同步结果写入 dev/(仓库默认 gitignore仅用于本次构建渲染
# - 同步脚本内部已做 best-effort失败不阻断后续 build
- name: Sync projects (best-effort)
run: npm run sync-projects
- name: Sync articles (best-effort)
run: npm run sync-articles
- name: Build site (clean dist + generate)
run: npm run build
- name: Check favicon
run: |