runtime-assets-config.ts — astro Source File
Architecture documentation for runtime-assets-config.ts, a typescript file in the astro codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f610fcbe_5fd5_7e96_2478_719d97d3e236["runtime-assets-config.ts"] 3270b1f7_c0cc_6ab7_4219_0c33f091953e["astro:assets"] f610fcbe_5fd5_7e96_2478_719d97d3e236 --> 3270b1f7_c0cc_6ab7_4219_0c33f091953e 66694f7f_e28b_10b3_a89e_367534fe710c["markdoc"] f610fcbe_5fd5_7e96_2478_719d97d3e236 --> 66694f7f_e28b_10b3_a89e_367534fe710c style f610fcbe_5fd5_7e96_2478_719d97d3e236 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
//@ts-expect-error Cannot find module 'astro:assets' or its corresponding type declarations.
import { Image } from 'astro:assets';
import type { Config as MarkdocConfig } from '@markdoc/markdoc';
import Markdoc from '@markdoc/markdoc';
export const assetsConfig: MarkdocConfig = {
nodes: {
image: {
attributes: {
...Markdoc.nodes.image.attributes,
__optimizedSrc: { type: 'Object' },
},
transform(node, config) {
const attributes = node.transformAttributes(config);
const children = node.transformChildren(config);
if (node.type === 'image' && '__optimizedSrc' in node.attributes) {
const { __optimizedSrc, ...rest } = node.attributes;
return new Markdoc.Tag(Image, { ...rest, src: __optimizedSrc }, children);
} else {
return new Markdoc.Tag('img', attributes, children);
}
},
},
},
};
Dependencies
- astro:assets
- markdoc
Source
Frequently Asked Questions
What does runtime-assets-config.ts do?
runtime-assets-config.ts is a source file in the astro codebase, written in typescript.
What does runtime-assets-config.ts depend on?
runtime-assets-config.ts imports 2 module(s): astro:assets, markdoc.
Where is runtime-assets-config.ts in the architecture?
runtime-assets-config.ts is located at packages/integrations/markdoc/src/runtime-assets-config.ts (directory: packages/integrations/markdoc/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free