Drop the kbar search index and the dead MDX video mapping - #1997
Open
marcleblanc2 wants to merge 1 commit into
Open
marcleblanc2 wants to merge 1 commit into
marcleblanc2 wants to merge 1 commit into
Conversation
kbar was removed in #110; the contentlayer onSuccess hook kept writing a 725 KB public/search.json that nothing fetched. src/utils/contentlayer.ts only existed to build that index. MDX compiles an explicit <video> to a literal element, so components.video never ran; the rounded-xl class it set was never applied. Amp-Thread-ID: https://ampcode.com/threads/T-01a0ae6a-1645-702a-a5ed-92f8b9bce33b Co-authored-by: Amp <amp@ampcode.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Contributor
|
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.
Problem
src/data/search.tsand the contentlayeronSuccesshook stayed behind, writing a 725 KBpublic/search.jsonon every build that nothing fetchessrc/utils/contentlayer.tsonly existed to build that indexvideoentry inMdxComponents.tsxnever runs: MDX compiles an explicit<video>to a literal element, socomponents.videois never consulted (therounded-xlclass it set has never been applied)Change
32 lines and one file deleted, nothing added.
Verification
pnpm run buildpasses and no longer producespublic/search.jsonnpx tsc --noEmitclean;pnpm run lintat the 39-warning baselinerg -i 'kbar|search\.json'finds nothing<video>markup on/docs/code-monitoringis byte-identical before and after (it never had the class)Note: #1977 touches the same
searchDocumentsPathline; whichever merges second gets a one-line rebase.