# markdoc/markdoc

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/markdoc-markdoc).**

8,060 stars · 226 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/markdoc/markdoc
- Homepage: https://markdoc.dev
- awesome-repositories: https://awesome-repositories.com/repository/markdoc-markdoc.md

## Topics

`authoring` `documentation` `markdoc` `markdown` `react` `toolchain`

## Description

Markdoc is a documentation content framework that extends standard Markdown with custom tags, typed schemas, and reusable components, parsing content into an abstract syntax tree and rendering it as React elements or HTML. It provides a structured authoring system where documents are processed through an AST-based pipeline, enabling validation, transformation, and flexible output generation.

The framework distinguishes itself through a schema-driven validation pipeline that checks document structure and attribute values against defined rules, and a pluggable renderer architecture that accepts renderable trees for any output format. It supports conditional content evaluation with boolean expressions and switch/case logic, function injection for runtime data transformation, and partial template inclusion for content reuse across documents. Custom tag schemas allow definition of reusable elements with typed attributes and custom transform logic, while annotation-based attribute binding enables per-element customization without inline syntax.

Markdoc includes capabilities for content manifests, page-level metadata, frontmatter access, table of contents generation, code syntax highlighting, and tabbed content sections. It provides programmatic transformation for static analysis and validation, runtime value injection, and integration with frameworks like Next.js for server-side rendering. The framework supports both block and inline custom components, rich tables, and shorthand class and ID syntax, with options for custom page layouts and heading IDs.

## Tags

### Content Management & Publishing

- [Markdown-Based Content Authoring](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-authoring-tools/markdown-based-content-authoring/markdown-based-content-authoring.md) — Provides a Markdown-based syntax extended with custom tags and components for creating documentation sites. ([source](https://markdoc.dev/))
- [Reusable Content Blocks](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/content-organization-systems/reusable-content-blocks.md) — Provides partial template inclusion and variable passing for composing documents from reusable content blocks.
- [Schema Validators](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/document-models/document-sectioning/document-content-structuring/schema-validators.md) — Validates document nodes and attributes against defined schema rules before rendering. ([source](https://markdoc.dev/docs/nodes))
- [Markdown Extensions](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-authoring-tools/markdown-based-content-authoring/markdown-based-content-authoring/markdown-extensions.md) — Extends standard Markdown with custom tags, nodes, and functions for rich content authoring.
- [Markdoc](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/markdown-markup-tools/markdown-tools/markdown-renderers/markdown-transformation-pipelines/ast-transformations/markdoc.md) — Converts parsed abstract syntax trees into renderable data structures using custom schemas and components. ([source](https://cdn.jsdelivr.net/gh/markdoc/markdoc@main/README.md))
- [Markdown](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/markdown-markup-tools/markdown-tools/markdown-renderers/markdown-transformation-pipelines/ast-transformations/markdown.md) — Transforms parsed Markdown ASTs into renderable content structures using optional configuration. ([source](https://markdoc.dev/docs))
- [Custom Rendering Integrations](https://awesome-repositories.com/f/content-management-publishing/dynamic-markup-rendering/custom-rendering-integrations.md) — Accepts a renderable tree and returns any desired output format, enabling integration with any UI framework. ([source](https://markdoc.dev/docs/render))
- [Inline Function Invocations](https://awesome-repositories.com/f/content-management-publishing/inline-function-invocations.md) — Invokes JavaScript-like functions from document body, annotations, or tag attributes to transform values. ([source](https://markdoc.dev/docs/syntax))
- [Markdown Node Transformers](https://awesome-repositories.com/f/content-management-publishing/markdown-node-transformers.md) — Converts parsed Markdown nodes into any renderable format via custom transform functions. ([source](https://markdoc.dev/docs/nodes))
- [Markdown Parsing Pipelines](https://awesome-repositories.com/f/content-management-publishing/markdown-parsing-pipelines.md) — Parses Markdown source text into an abstract syntax tree for further processing. ([source](https://markdoc.dev/docs))
- [Markdown AST Parsing](https://awesome-repositories.com/f/content-management-publishing/markdown-parsing-pipelines/markdown-ast-parsing.md) — Converts raw Markdown strings into abstract syntax trees capturing content structure and location. ([source](https://markdoc.dev/docs/render))
- [Component Tree Renderers](https://awesome-repositories.com/f/content-management-publishing/markdown-renderers/component-tree-renderers.md) — Converts Markdown documents into React component trees for interactive documentation features. ([source](https://markdoc.dev/docs/overview))
- [Multi-Format Document Rendering](https://awesome-repositories.com/f/content-management-publishing/multi-format-document-rendering.md) — Transforms parsed content into HTML or other output formats through pluggable renderers. ([source](https://markdoc.dev/))
- [Live Page Content Readers](https://awesome-repositories.com/f/content-management-publishing/page-insertion/text-page-generation/per-page-content-extractors/live-page-content-readers.md) — Inserts content from separate files into a document so the same text appears in multiple places without duplication. ([source](https://markdoc.dev/docs/tags))
- [Partial Document Inclusion](https://awesome-repositories.com/f/content-management-publishing/partial-document-inclusion.md) — Embeds separate files into documents via partial tags, enabling content reuse across multiple pages. ([source](https://markdoc.dev/docs/partials))
- [Custom Validation Functions](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-validation/custom-validation-functions.md) — Runs user-defined validation functions on document nodes and tags to enforce content constraints. ([source](https://markdoc.dev/docs/validation))
- [Content Manifest Builders](https://awesome-repositories.com/f/content-management-publishing/content-manifest-builders.md) — Parses documents on the server to build a route-to-content mapping for dynamic serving. ([source](https://markdoc.dev/docs/examples/html))
- [Document-Level Switch/Case Logic](https://awesome-repositories.com/f/content-management-publishing/document-level-switch-case-logic.md) — Implements switch/case conditional rendering in documents using custom tags. ([source](https://markdoc.dev/docs/examples))
- [Rich Table Syntaxes](https://awesome-repositories.com/f/content-management-publishing/rich-table-syntaxes.md) — Ships a list-based table syntax supporting code blocks, lists, and configurable column spans. ([source](https://markdoc.dev/docs/tags))
- [Content Manifests](https://awesome-repositories.com/f/content-management-publishing/static-site-document-generators/static-site-generators/static-site-generation/content-manifests.md) — Generates page manifests and validates content at build time for rendering Markdown documents as pages in Next.js.
- [Server-Side Rendering Integrations](https://awesome-repositories.com/f/content-management-publishing/static-site-document-generators/static-site-generators/static-site-generation/server-side-rendering-integrations.md) — Integrates with Next.js for server-side rendering of Markdown documents with custom components.

### Web Development

- [Markdown Custom Tags](https://awesome-repositories.com/f/web-development/custom-template-tags/markdown-custom-tags.md) — Extends standard Markdown with custom tags, typed schemas, and reusable components for rich documentation authoring.
- [Content Transformers](https://awesome-repositories.com/f/web-development/content-transformers.md) — Parses documents into traversable ASTs for static analysis, validation, and automated transformation. ([source](https://markdoc.dev/docs/overview))
- [React Renderers](https://awesome-repositories.com/f/web-development/frontend-development-tools/frontend-frameworks/rendering-engines/react-renderers.md) — Converts the renderable tree into React elements using a mapping of custom tags to components. ([source](https://markdoc.dev/docs/render))
- [Markdown-to-React Renderers](https://awesome-repositories.com/f/web-development/frontend-development-tools/frontend-frameworks/rendering-engines/react-renderers/markdown-to-react-renderers.md) — Converts Markdown documents into React element trees with support for custom components. ([source](https://markdoc.dev/docs/examples/react))
- [HTML Content Renderers](https://awesome-repositories.com/f/web-development/html-content-renderers.md) — Transforms content into HTML on the server using a configurable renderer with custom tags and nodes. ([source](https://markdoc.dev/docs/examples/html))
- [Documentation Frameworks](https://awesome-repositories.com/f/web-development/mini-app-frameworks/vue-based-frameworks/documentation-frameworks.md) — Provides a content framework that parses Markdown into an AST and renders it as React components or HTML.
- [Next.js](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/rendering-and-layout-architectures/server-side-rendering-frameworks/framework-integrations/next-js.md) — Registers and renders Next.js-specific tags directly inside content for framework integration. ([source](https://markdoc.dev/docs/nextjs))
- [Template Variable Injection](https://awesome-repositories.com/f/web-development/content-insertion-utilities/dynamic-content-insertion/template-insertions/template-variable-injection.md) — Inserts dynamic, serializable values prefixed with a symbol into document content at render time. ([source](https://markdoc.dev/docs/syntax))
- [Document Attribute Passing](https://awesome-repositories.com/f/web-development/element-attributes/document-attribute-passing.md) — Attaches typed values to tags and nodes to control their rendering behavior in document pipelines. ([source](https://markdoc.dev/docs/syntax))
- [Document Layout Wrappers](https://awesome-repositories.com/f/web-development/layout-engines/page-layout-configurations/custom-layout-overrides/document-layout-wrappers.md) — Provides a mechanism to wrap rendered Markdown content in custom layout components. ([source](https://markdoc.dev/docs/nextjs))
- [Table of Contents Generators](https://awesome-repositories.com/f/web-development/table-of-contents-generators.md) — Collects all headings from the transformed document tree and renders them as a navigable list with anchor links. ([source](https://markdoc.dev/docs/examples))

### Development Tools & Productivity

- [Renderable AST Transformations](https://awesome-repositories.com/f/development-tools-productivity/ast-transformation-tools/standardized-ast-transformation/renderable-ast-transformations.md) — Converts abstract syntax trees into serializable intermediate representations for flexible output generation. ([source](https://markdoc.dev/docs/render))
- [Conditional Content Blocks](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/project-scaffolding-configuration/templating-engines/dynamic-templates/content-templates/conditional-content-blocks.md) — Uses variables, functions, and conditional tags to control what content renders based on runtime data.
- [Reusable Content Snippets](https://awesome-repositories.com/f/development-tools-productivity/snippet-management-tools/reusable-content-snippets.md) — Loads and renders partial files from a designated directory to reuse content across pages. ([source](https://markdoc.dev/docs/nextjs))
- [Pluggable Template Renderers](https://awesome-repositories.com/f/development-tools-productivity/template-rendering-engines/pluggable-template-renderers.md) — Accepts a renderable tree and returns any output format through configurable renderers for HTML, React, and custom frameworks.
- [Content Validation Rules](https://awesome-repositories.com/f/development-tools-productivity/build-validation-tools/build-time-validation/content-validation-rules.md) — Ships a build-time validation pipeline that checks document structure and attributes against custom rules. ([source](https://markdoc.dev/))
- [Template Partials](https://awesome-repositories.com/f/development-tools-productivity/file-inclusion-rules/template-partials.md) — Loads and renders reusable content snippets from external files with context-specific variable passing.
- [Looping Content Blocks](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/project-scaffolding-configuration/templating-engines/dynamic-templates/content-templates/looping-content-blocks.md) — Iterates over items in a custom tag's transform function to generate repeated content from a data array. ([source](https://markdoc.dev/docs/examples))

### Software Engineering & Architecture

- [Abstract Syntax Tree Parsing](https://awesome-repositories.com/f/software-engineering-architecture/abstract-syntax-tree-parsing.md) — Parses Markdown extended with custom tags into an abstract syntax tree for further processing. ([source](https://markdoc.dev/docs/validation))
- [Document](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/object-oriented-foundations/object-oriented-programming/attribute-management/annotation-attributes/document.md) — Provides a system for attaching typed attributes to document nodes via separate annotation blocks.
- [AST Transformation Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/transformation-pipelines/execution-pipeline-transformation/ast-transformation-pipelines.md) — Implements an AST transformation pipeline that converts Markdown into a renderable intermediate representation.
- [Documentation Validators](https://awesome-repositories.com/f/software-engineering-architecture/code-documentation-standards/documentation-validators.md) — Checks documents for correctness separately from the rendering pipeline using custom rules. ([source](https://markdoc.dev/docs/render))
- [Schema-Driven Validations](https://awesome-repositories.com/f/software-engineering-architecture/data-validation-schemas/schema-driven-validations.md) — Checks document structure and attribute values against defined schemas during transformation to catch errors before rendering.
- [Dynamic Function Injection](https://awesome-repositories.com/f/software-engineering-architecture/dynamic-function-injection.md) — Registers user-defined JavaScript functions callable from document body and tag attributes for runtime data transformation.
- [Heading Identifiers](https://awesome-repositories.com/f/software-engineering-architecture/identifier-generators/heading-identifiers.md) — Overrides default heading nodes to generate custom HTML id attributes for deep linking. ([source](https://markdoc.dev/docs/examples/react))

### Testing & Quality Assurance

- [Conditional Logic Evaluation](https://awesome-repositories.com/f/testing-quality-assurance/boolean-assertions/conditional-logic-evaluation.md) — Evaluates boolean expressions within document templates to conditionally render content based on variable states. ([source](https://markdoc.dev/docs/functions))
- [Document Conditional Evaluations](https://awesome-repositories.com/f/testing-quality-assurance/boolean-assertions/conditional-logic-evaluation/document-conditional-evaluations.md) — Evaluates boolean expressions and variable comparisons to control content visibility in documents.
- [Undefined Value Handling](https://awesome-repositories.com/f/testing-quality-assurance/validation-verification/input-validation/undefined-value-handling.md) — Returns specified default values when variables are undefined to prevent rendering errors. ([source](https://markdoc.dev/docs/functions))

### User Interface & Experience

- [Custom Component Tags](https://awesome-repositories.com/f/user-interface-experience/buttons/custom-html-elements/custom-component-tags.md) — Defines custom tags that map to React components or Web Components for interactive content elements.
- [Markdown Tag Composition](https://awesome-repositories.com/f/user-interface-experience/buttons/custom-html-elements/custom-component-tags/markdown-tag-composition.md) — Extends standard Markdown with custom tags enclosed in delimiters to create reusable, nestable content components. ([source](https://markdoc.dev/docs/syntax))
- [Markdown Tag Syntax Extensions](https://awesome-repositories.com/f/user-interface-experience/buttons/custom-html-elements/custom-component-tags/markdown-tag-syntax-extensions.md) — Adds a declarative tag syntax to Markdown for expressing document hierarchy, interactive components, and conditional content. ([source](https://markdoc.dev/docs/overview))
- [Schema-Backed Markdown Tags](https://awesome-repositories.com/f/user-interface-experience/buttons/custom-html-elements/custom-component-tags/schema-backed-markdown-tags.md) — Registers custom tags with schemas that map to components, including typed attributes and allowed child content. ([source](https://markdoc.dev/docs/examples/react))
- [Component Data Passing](https://awesome-repositories.com/f/user-interface-experience/component-architectures/component-communication-patterns/component-data-passing.md) — Passes typed values to custom tags using HTML-like or annotation syntax for component configuration. ([source](https://markdoc.dev/docs/attributes))
- [Conditional Rendering](https://awesome-repositories.com/f/user-interface-experience/conditional-rendering.md) — Renders content only when specified conditions evaluate to true, with optional fallback for false conditions. ([source](https://markdoc.dev/docs/tags))
- [Markdown Block Components](https://awesome-repositories.com/f/user-interface-experience/content-block-editors/custom-block-definitions/markdown-block-components.md) — Provides a system for defining custom block-level components within Markdown content using typed schemas. ([source](https://markdoc.dev/docs/tags))
- [Configurable Document Rendering](https://awesome-repositories.com/f/user-interface-experience/documentation-rendering/configurable-document-rendering.md) — Passes variables, custom tags, nodes, functions, and partials to control how Markdown content renders. ([source](https://markdoc.dev/docs/config))
- [HTML Document Renderers](https://awesome-repositories.com/f/user-interface-experience/html-document-renderers.md) — Converts the renderable tree into an HTML string for direct use in web pages or server responses. ([source](https://markdoc.dev/docs/render))
- [Markdown Render Overrides](https://awesome-repositories.com/f/user-interface-experience/markdown-renderers/markdown-render-overrides.md) — Overrides how standard Markdown elements render by defining custom node schemas. ([source](https://markdoc.dev/docs/nodes))
- [Tag Attribute Schemas](https://awesome-repositories.com/f/user-interface-experience/buttons/attribute-validation/tag-attribute-schemas.md) — Provides per-tag attribute type configuration with validation rules to enforce correct usage. ([source](https://markdoc.dev/docs/attributes))
- [Page Metadata Overrides](https://awesome-repositories.com/f/user-interface-experience/collection-metadata-overrides/page-metadata-overrides.md) — Attaches structured metadata like title and description to documents using frontmatter formats. ([source](https://markdoc.dev/docs/frontmatter))
- [Custom Components](https://awesome-repositories.com/f/user-interface-experience/custom-components.md) — Creates reusable custom elements for tags to encapsulate rendering logic within Markdown content. ([source](https://markdoc.dev/docs/examples/html))
- [Separate Block Annotations](https://awesome-repositories.com/f/user-interface-experience/document-metadata-annotators/inline-metadata-annotations/separate-block-annotations.md) — Applies attributes to inline Markdown nodes using a separate annotation block for per-element customization. ([source](https://markdoc.dev/docs/syntax))
- [Custom Inline Tag Definitions](https://awesome-repositories.com/f/user-interface-experience/inline-styles/code-inline-styling/inline-code-component-customizations/custom-inline-tag-definitions.md) — Defines new tags that render as inline elements, automatically wrapped in paragraph nodes. ([source](https://markdoc.dev/docs/tags))
- [Separate Block Annotations](https://awesome-repositories.com/f/user-interface-experience/node-annotations/separate-block-annotations.md) — Attaches typed data to any node by placing attributes in a separate annotation block after the node. ([source](https://markdoc.dev/docs/attributes))
- [Syntax Highlighting](https://awesome-repositories.com/f/user-interface-experience/presentation-frameworks/code-presentation-utilities/code-line-highlighting/syntax-highlighting.md) — Applies syntax highlighting to code blocks by replacing default fence nodes with custom renderers. ([source](https://markdoc.dev/docs/examples))
- [Tabbed Content Panes](https://awesome-repositories.com/f/user-interface-experience/tabbed-content-panes.md) — Groups content into tabs using custom tags and components that switch between labeled panels. ([source](https://markdoc.dev/docs/examples))
- [Data Value Injections](https://awesome-repositories.com/f/user-interface-experience/template-injection-hooks/markup-injection-directives/dynamic-markup-injection/data-value-injections.md) — Inserts server-side data into documents at render time, updating output as data changes. ([source](https://markdoc.dev/docs/variables))

### Data & Databases

- [Frontmatter](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-serialization/json-schema/metadata-schemas/frontmatter.md) — Exposes parsed frontmatter values as template variables for rendering inside document bodies. ([source](https://markdoc.dev/docs/frontmatter))

### Programming Languages & Runtimes

- [Custom Runtime Logic](https://awesome-repositories.com/f/programming-languages-runtimes/custom-runtime-logic.md) — Registers user-defined JavaScript functions callable within content to transform data or perform custom operations. ([source](https://markdoc.dev/docs/functions))
