博客改版:纸质手记风格 + Markdown 写作台 + 自动发布 - #1
Manuforest wants to merge 1 commit into
Conversation
Preserve existing Hexo exports and legacy routes. Add static Python build, responsive light/dark theme, search, archives, tags, writing/image ZIP tools, content validation tests, and opt-in GitHub Pages Actions deployment.
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: f0a629d1c5
ℹ️ 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".
| slug = slugify(meta.get("slug", filename_slug)) | ||
| if slug in posts: | ||
| raise ValueError(f"重复 slug: {slug};请改名,旧文章不会被隐式覆盖") | ||
| title_match = re.search(r"^#\s+(.+)$", text, re.M) |
There was a problem hiding this comment.
Parse Markdown before choosing the title
When a post omits frontmatter title and contains a fenced code line such as # install, this regex treats that line as the article heading, uses it as the title, and removes it from the source before rendering, corrupting both the title and code sample. Derive the title from a parsed top-level heading outside code blocks rather than searching the raw Markdown text.
Useful? React with 👍 / 👎.
改动
新增米白 / 灰绿的个人手记主题:首页、文章页、归档、标签、关于页、留言板、404 与手机布局;支持明暗主题、全文搜索、文章目录、代码复制、RSS 和站点地图。
新增
/write/本机 Markdown 写作台:原稿 / 基础预览、导入、单份 IndexedDB 草稿、粘贴 / 拖入图片、文章与图片 ZIP 导出,以及 GitHub 上传快捷入口。写作台不索取 GitHub Token,也不代替用户执行提交。发布流程为:导出 → 解压 → 上传文章文件夹到content/posts/→ 提交 → Actions 构建并部署。原内容保护
保留现有全部文件,不覆盖或改写旧文章 JSON、旧首页或原图。新增构建从
api/articles/*.json读取仓库内 11 篇旧文章,生成.html与目录式旧链接入口。正文做可执行 HTML 清理,保留文字、图片地址和标题锚点。新文章可直接以 Markdown + 图片文件夹维护;旧文尚未批量转换为 Markdown。_site/不输出原api/site.json、Markdown 源稿或未发布草稿独占的附件。请注意:公开仓库中已提交的draft: true文件仍然公开。旧配置已有 GitalkclientSecret字段,请到对应 OAuth App 撤销 / 轮换;排除网站输出不能撤销已经公开的凭据。已完成验证
尚未验证真实域名下 IndexedDB 刷新恢复、远程图床可用性、原 Twikoo 服务与历史评论匹配、线上部署。PR 的 build 只校验和上传可下载的
journal-previewartifact,不发布线上。第一次上线
详细写作、上传、配置、预览和回退说明已写入 README。现有线上站点在本 PR 合并和切换部署前保持不变。