Skip to content

fabe/markdoc-contentful

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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