You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to pull out a list of IDs that are within my MDX which will match the regex of const TWEET_RE = /<StaticTweet\sid="[0-9]+"\s\/>/g; that I can then use to perform getStaticProps.
I was wondering if there's an easy way to modify the makeSource config folder so that I can simply map over the individual file contents within my target folder to extract these IDs.
This is my existing makeSource config.
exportdefaultmakeSource({contentDirPath: "posts",documentTypes: [Post],mdx: {rehypePlugins: [[rehypePrettyCode,{// theme: "github-dark",theme: JSON.parse(readFileSync(themePath,"utf-8")),onVisitLine(node: any){// Prevent lines from collapsing in `display: grid` mode, and allow empty// lines to be copy/pastedif(node.children.length===0){node.children=[{type: "text",value: " "}];}},onVisitHighlightedLine(node: any){node.properties.className.push("line--highlighted");},onVisitHighlightedWord(node: any){node.properties.className=["word--highlighted"];},},],],},});
Activity