Skip to content

feat(processor): manually inject frontmatter with source tag#136

Merged
avivkeller merged 2 commits into
webpack:mainfrom
moshams272:feat/manual-source-frontmatter
Jun 14, 2026
Merged

feat(processor): manually inject frontmatter with source tag#136
avivkeller merged 2 commits into
webpack:mainfrom
moshams272:feat/manual-source-frontmatter

Conversation

@moshams272

@moshams272 moshams272 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds source frontmatter in the API documentation pages, which is a blocker for the "Edit Page" button (#131) as mentioned in #132.

Instead of relying on the typedoc-plugin-frontmatter, this implementation manually injects the frontmatter block as a string at the beginning of the markdown content. By using MarkdownPageEvent.END hook to access the final markdown string and sourceRelativePath to construct the full GitHub repository URL. This approach provides more control over the output and prevents conflicts with doc-kit.

After:
image

@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-doc-kit Ready Ready Preview, Comment Jun 14, 2026 4:09pm

Request Review

Comment thread plugins/processor/index.mjs Outdated
Comment thread plugins/processor/index.mjs
@avivkeller avivkeller merged commit 6eb4efb into webpack:main Jun 14, 2026
4 checks passed
@moshams272 moshams272 deleted the feat/manual-source-frontmatter branch June 15, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants