diff --git a/app/libs/sections.ts b/app/libs/sections.ts index 2664e04..20f5ce9 100644 --- a/app/libs/sections.ts +++ b/app/libs/sections.ts @@ -2,5 +2,4 @@ export type Section = { id: string; title: string; level: 2 | 3; - path: string; }; diff --git a/app/remarkHeadingId.ts b/app/remarkHeadingId.ts index baee7e2..f407c38 100644 --- a/app/remarkHeadingId.ts +++ b/app/remarkHeadingId.ts @@ -124,21 +124,6 @@ const formatExportNode = (): MDXJSEsm => { method: false, shorthand: false, }, - { - type: "Property", - key: { - type: "Identifier", - name: "path", - }, - value: { - type: "Literal", - value: section.path, - }, - kind: "init", - computed: false, - method: false, - shorthand: false, - }, ], })), }, @@ -161,9 +146,6 @@ const remarkHeadingId: Plugin<[], Root> = () => (tree: Root, file) => { visit(tree, "heading", (node) => { const lastChild = node.children[node.children.length - 1]; - const filePath = file.path; - console.log(`File path: ${filePath}`); - if (lastChild && lastChild.type === "text") { const string = lastChild.value.replace(/ +$/, ""); const matched = string.match(/ {#(.*?)}$/); @@ -181,7 +163,6 @@ const remarkHeadingId: Plugin<[], Root> = () => (tree: Root, file) => { id: slug, title: extractText(node.children), level: depth, - path: filePath, }); });