Home / File/ markdoc.config.ts — astro Source File

markdoc.config.ts — astro Source File

Architecture documentation for markdoc.config.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.

File typescript 1 imports

Entity Profile

Dependency Diagram

graph LR
  c8f2a32d_ff5c_b1b1_9168_901fafccaa75["markdoc.config.ts"]
  4bbafc49_8177_60b9_fc06_09421d5c26da["config"]
  c8f2a32d_ff5c_b1b1_9168_901fafccaa75 --> 4bbafc49_8177_60b9_fc06_09421d5c26da
  style c8f2a32d_ff5c_b1b1_9168_901fafccaa75 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { Markdoc, component, defineMarkdocConfig } from '@astrojs/markdoc/config';

export default defineMarkdocConfig({
  nodes: {
    fence: {
      // Spread the built-in fence config (which has a transform function)
      // while overriding with a custom render component.
      // This is the scenario from issue #9708 - render should win over transform.
      ...Markdoc.nodes.fence,
      render: component('./src/components/CustomFence.astro'),
      attributes: {
        ...Markdoc.nodes.fence.attributes,
        // Override content to make it renderable as a prop
        content: { type: String, render: true, required: true },
        // Override language to render as 'language' prop instead of 'data-language'
        language: { type: String, render: true },
      },
    },
  },
});

Dependencies

  • config

Frequently Asked Questions

What does markdoc.config.ts do?
markdoc.config.ts is a source file in the astro codebase, written in typescript.
What does markdoc.config.ts depend on?
markdoc.config.ts imports 1 module(s): config.
Where is markdoc.config.ts in the architecture?
markdoc.config.ts is located at packages/integrations/markdoc/test/fixtures/render-with-transform/markdoc.config.ts (directory: packages/integrations/markdoc/test/fixtures/render-with-transform).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free