/markdoc-contentful

Adds a Markdoc field to Contentful

Primary LanguageJavaScriptApache License 2.0Apache-2.0

markdoc-contentful

Adds a Markdoc field to Contentful.

Install to Contentful

Usage

After installation, create or use JSON field and assign the Markdoc app to the field via the Appearance tab in the settings.

Preview

On your website, you'll be able to use the field value just like any other field. The response of the Markdoc fields will look something like this:

{
  "raw": "Markdoc is a Markdown-based syntax and ...",
  "ast": { "$$mdtype": "Node","errors":[],"lines":[],"inline":false ... },
  "renderableTree": { "$$mdtype":"Tag","name":"article","attributes" ... }
}

Todo

  • Inline preview
  • Error handling
  • Custom components/styling