rehype-collect-headings.ts — astro Source File
Architecture documentation for rehype-collect-headings.ts, a typescript file in the astro codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 3c9e5992_882f_d415_46c7_b62ff2add339["rehype-collect-headings.ts"] ab5f9b39_abc6_0697_d4ba_c51748add5b2["./utils.js"] 3c9e5992_882f_d415_46c7_b62ff2add339 --> ab5f9b39_abc6_0697_d4ba_c51748add5b2 b909a1d2_5b96_acd8_d198_1f106f44e2c3["vfile"] 3c9e5992_882f_d415_46c7_b62ff2add339 --> b909a1d2_5b96_acd8_d198_1f106f44e2c3 style 3c9e5992_882f_d415_46c7_b62ff2add339 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { VFile } from 'vfile';
import { jsToTreeNode } from './utils.js';
export function rehypeInjectHeadingsExport() {
return function (tree: any, file: VFile) {
const headings = file.data.astro?.headings ?? [];
tree.children.unshift(
jsToTreeNode(`export function getHeadings() { return ${JSON.stringify(headings)} }`),
);
};
}
Domain
Subdomains
Functions
Dependencies
- ./utils.js
- vfile
Source
Frequently Asked Questions
What does rehype-collect-headings.ts do?
rehype-collect-headings.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RoutingSystem subdomain.
What functions are defined in rehype-collect-headings.ts?
rehype-collect-headings.ts defines 1 function(s): rehypeInjectHeadingsExport.
What does rehype-collect-headings.ts depend on?
rehype-collect-headings.ts imports 2 module(s): ./utils.js, vfile.
Where is rehype-collect-headings.ts in the architecture?
rehype-collect-headings.ts is located at packages/integrations/mdx/src/rehype-collect-headings.ts (domain: CoreAstro, subdomain: RoutingSystem, directory: packages/integrations/mdx/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free