feat: render GitHub issue/PR links GitHub-style with state + title#19
Open
16bit-ykiko wants to merge 1 commit into
Open
feat: render GitHub issue/PR links GitHub-style with state + title#1916bit-ykiko wants to merge 1 commit into
16bit-ykiko wants to merge 1 commit into
Conversation
Bare GitHub issue/PR URLs in markdown now render the way GitHub renders a pasted reference: a leading state-colored octicon, the issue/PR title inline (backtick spans become inline code), and a muted owner/repo#number. State and title are resolved at build time and cached in .vitepress/github-links.json, so the published site is a static snapshot with no client-side API calls. The cache refreshes live only when a GITHUB_TOKEN is present or DOCS_REFRESH_GH=1 is set; otherwise builds stay fully offline and deterministic.
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.
Summary
Bare GitHub issue/PR URLs in the docs now render the way GitHub renders a pasted reference, instead of as a plain link:
<code>);owner/repo#numbertrails the title.This replaces the previous hand-maintained
`open`/`closed`markers in footnotes — authors now just drop a bare GitHub URL and the state + title render automatically.How it works
.vitepress/github-links.ts) rewrites matching issue/PR links at render time and is wired intoconfig.mts..vitepress/github-links.json, so the published site is a static snapshot with no client-side API calls.GITHUB_TOKEN/GH_TOKENis present (CI) orDOCS_REFRESH_GH=1is set; otherwise local builds stay fully offline and deterministic (no rate limits).[#460](url)) keep the author's text and only gain the leading state icon.Test plan
npm run buildsucceeds (verified locally).[icon] Title owner/repo#numberinline (verified via headless screenshot offeatures/completion).import,module,CompletionItemKind.Keyword).