docs: add CC 深信服一面 - #47
Merged
Merged
Conversation
LeoninCS
pushed a commit
that referenced
this pull request
Aug 8, 2026
Windows 编辑器容易把文件存成 CRLF。内容一个字没改,git 也会认为 整段被重写,和别人的改动撞上就变成"假冲突"——PR #47 就是这么来的: _index.md 的 front matter 内容完全没变,只因行尾多了 \r 就冲突了。 * text=auto eol=lf 从源头消除这类问题。 同时对存量的 36 个 CRLF 文件(epub 转换来的章节)做了 renormalize, 纯换行符转换,内容零改动,构建产物哈希不变。 shell 脚本和 .githooks 显式声明 eol=lf,避免 CRLF 导致 "bad interpreter: ...^M" 无法执行。
LeoninCS
pushed a commit
that referenced
this pull request
Aug 8, 2026
外部贡献者不会装本地 git hook,也不该为站点运维细节操心。 PR #47 就暴露了这点:投稿者只是加一篇面经,却会因为缺 /s/ 短链 被 CI 拦下来。 改为两层自动化: - 本地:pre-commit hook 在 commit 时自动生成(已有) - 远端:新增 shortlink-sync.yml,main 收到提交后自动补齐并提交, 再显式触发 static.yml 部署(GITHUB_TOKEN 的 push 不会 自动触发其他 workflow) pr-check 里的短链检查降级为 notice 提示,不再让 PR 失败。 slug 检查保持拦截,因为 slug 需要人工起有意义的英文名。 安全措施: - 幂等,无页面缺短链时不产生提交,不会自我循环(已本地验证) - 提交前校验改动范围,出现 content/*.md 之外的文件直接中止 - push 前 rebase,避免与运行期间的新提交打架
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容