MCPcopy
hub / github.com/markdoc/markdoc

github.com/markdoc/markdoc @0.5.7 sqlite

repository ↗ · DeepWiki ↗ · release 0.5.7 ↗
285 symbols 691 edges 57 files 0 documented · 0%
README

Markdoc

A powerful, flexible, Markdown-based authoring framework.

Markdoc is a Markdown-based syntax and toolchain for creating custom documentation sites and experiences.
We designed Markdoc to power Stripe's public docs, our largest and most complex content site.

Installation

To get started with Markdoc, first install the library:

npm install @markdoc/markdoc

or

yarn add @markdoc/markdoc

and import it in your app:

const Markdoc = require('@markdoc/markdoc');

or if you are using ESM

import Markdoc from '@markdoc/markdoc';

then use Markdoc in your app or tool:

const doc = `
# Markdoc README

{% image src="https://github.com/markdoc/markdoc/raw/0.5.7/logo.svg" /%}
`;

const ast = Markdoc.parse(doc);
const content = Markdoc.transform(ast);
return Markdoc.renderers.react(content, React);

Check out our docs for more guidance on how to use Markdoc.

TypeScript

This is the minimal tsconfig.json required to use Markdoc in your TypeScript project:

{
  "compilerOptions": {
    "moduleResolution": "node",
    "target": "esnext", // works with es2015 or greater
    "esModuleInterop": true
  }
}

React

If you are using React, install Markdoc with:

npm install @markdoc/markdoc react @types/react

Contributing

Contributions and feedback are welcome and encouraged. Check out our contributing guidelines on how to do so.

Development

  1. Run npm install
  2. Run npm run build
  3. Run the tests using npm test

Code of conduct

This project has adopted the Stripe Code of conduct.

License

This project uses the MIT license.

Credits

Special shout out to:

Extension points exported contracts — how you extend this code

AstType (Interface)
(no doc) [6 implementers]
src/types.ts
SyntaxError (Interface)
(no doc)
src/grammar/tag.d.ts
Matchers (Interface)
(no doc)
spec/support/matchers.d.ts
CustomAttributeTypeInterface (Interface)
(no doc) [4 implementers]
src/types.ts
CustomAttributeType (Interface)
(no doc)
src/types.ts
Transformer (Interface)
(no doc)
src/types.ts

Core symbols most depended-on inside this repo

push
called by 79
src/ast/node.ts
toDeepEqualSubset
called by 79
spec/support/matchers.d.ts
toDeepEqual
called by 73
spec/support/matchers.d.ts
peg$parse_
called by 35
src/grammar/tag.js
peg$expect
called by 33
src/grammar/tag.js
rule$expects
called by 25
src/grammar/tag.js
findTagEnd
called by 19
src/utils.ts
formatChildren
called by 14
src/formatter.ts

Shape

Function 211
Method 35
Class 32
Interface 6
Enum 1

Languages

TypeScript100%

Modules by API surface

src/grammar/tag.js95 symbols
src/formatter.ts16 symbols
src/types.ts11 symbols
spec/marktest/index.ts11 symbols
src/ast/node.ts10 symbols
src/validator.ts9 symbols
index.ts9 symbols
src/validator.test.ts8 symbols
src/ast/node.test.ts7 symbols
src/utils.ts6 symbols
src/transforms/table.ts5 symbols
src/tokenizer/plugins/annotations.ts5 symbols

Dependencies from manifests, versioned

@eslint/js9.0.0 · 1×
@types/jasmine5.0.0 · 1×
@types/node18.0.0 · 1×
@types/react17.0.0 · 1×
deep-assert0.3.0 · 1×
diff4.0.4 · 1×
esbuild0.25.0 · 1×
eslint10.1.0 · 1×
globals16.0.0 · 1×
jasmine5.13.0 · 1×
jest-diff28.1.3 · 1×
markdown-it12.3.2 · 1×

For agents

$ claude mcp add markdoc \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact