博客极简改版与 Markdown 写作台 - #2
Conversation
…desk Replace the withdrawn paper-journal proposal with the approved minimal layout. Preserve legacy articles and routes; add progressive motion, search, responsive writing controls, blank drafts, image ZIP export and Pages build checks.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e1518d542
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| anchor = quote(tag) | ||
| redirect = f'<!doctype html><meta charset="utf-8"><meta http-equiv="refresh" content="0;url=/tags/#{anchor}"><a href="/tags/#{anchor}">查看标签</a>' | ||
| safe = slugify(tag) | ||
| write(f"tags/{safe}.html", redirect) |
There was a problem hiding this comment.
Reserve the tag index output path
When a published post uses the valid tag index, slugify(tag) also returns index, so this write replaces the real tags/index.html generated earlier with a redirect to /tags/#index. Consequently the main /tags/ page no longer renders and may repeatedly refresh to itself; reject/reserve this route name or avoid generating a colliding compatibility file.
Useful? React with 👍 / 👎.
| {% if kind == 'home' %} | ||
| <header class="page-heading"><h1 data-enter>文章<span class="heading-count">{{ '%02d'|format(posts|length) }}</span></h1></header> | ||
| <section class="journal" aria-label="文章列表"> | ||
| <div class="filter-scroll" data-enter><div class="filters" role="group" aria-label="按分类筛选"><button class="filter active" data-filter="all" aria-pressed="true">全部<span>{{ posts|length }}</span></button>{% for category, count in counts.items() %}<button class="filter" data-filter="{{ category }}" aria-pressed="false">{{ category }}<span>{{ count }}</span></button>{% endfor %}<span class="filter-marker" aria-hidden="true"></span></div></div> |
There was a problem hiding this comment.
Separate the all-filter sentinel from category names
If a post's category is literally all, this loop produces a second data-filter="all" button alongside the built-in “全部” button. In that scenario site.js treats either button as the universal sentinel, shows every row, and marks both buttons selected, so the actual all category cannot be filtered; use a sentinel that cannot collide with authored category values.
Useful? React with 👍 / 👎.
替代已关闭的 PR #1,使用白底蓝灰配色与单栏文章列表,移除装饰文案,加入渐进动效及 Markdown 写作台。
保留 11 篇旧文章与两种文章入口;支持草稿保存、图片和文章包导出,由 GitHub Actions 构建并发布 Pages。
验证:本地 15 项测试、3 个 JavaScript 语法检查和完整构建通过;旧文章入口与输出隔离检查通过,正文的 16 个外链图片均返回 HTTP 200。合并前等待本分支 Actions 构建。
已知待办:旧 Gitalk 密钥需在 OAuth App 撤销;线上草稿恢复和历史评论匹配待部署后验收。