fix: issue 86, and last updated missing fix#87
Merged
Conversation
原文「反过来接——阳极接引脚、阴极接地」与第一种接法(阳极接引脚、阴极接地)完全相同,且与下文「板载 LED 低电平点亮」自相矛盾。改为明确区分两种接法:源电流(source,电阻+LED 在引脚与地之间,高电平点亮)与灌电流(sink,电阻+LED 在电源与引脚之间,低电平点亮),并点明 PC13 板载 LED 为灌电流接法。CN/EN 同步修正。
分卷构建(scripts/build.ts)把 md 复制到 gitignored 的 site/.vitepress/.build-tmp/ 再交 VitePress 构建。VitePress 的 lastUpdated 默认对构建源文件跑 git log 取时间,副本不在 git index 里拿不到历史(实测返回空),导致线上 Last Updated 消失。新增 git-timestamp.ts:transformPageData 用 pageData.relativePath 定位 documents/ 下真实源文件(副本保留目录结构、EN 带 en/ 前缀),对其 git log 取毫秒时间戳覆盖 pageData.lastUpdated,单位对齐 VitePress 内部 +new Date(--pretty=%ai)。本地构建验证:GPIO 页渲染 <time datetime=2026-06-15T11:08:53Z>,全站 1009 页含 last-updated 块。
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.
No description provided.