contentlayerdev / contentlayer

Contentlayer turns your content into data - making it super easy to import MD(X) and CMS content in your app
https://www.contentlayer.dev
MIT License
3.25k stars 201 forks source link

Add support for Markdoc format #228

Open schickling opened 2 years ago

schickling commented 2 years ago

https://markdoc.io

seancdavis commented 2 years ago

I wonder if we could come up with a more generic way to solve similar problems? This syntax is similar to other template languages — Liquid, Nunjucks, etc.

11ty has a concept of markdownTemplateEngine that adds a template language processor on top of markdown. Maybe it's something like that? But maybe instead of doing something so opinionated, we find a way to open it up?

Or do we solve with documentation/examples for now?

timfee commented 2 years ago

I was wondering how to square these two.

The primary use case for me was having access to functions like

import { allFoos } from 'contentlayer/generated'

so I could generate dynamic navigation.

One relevant discussion

mfix-stripe commented 2 years ago

@schickling let me know how I can support you in this effort. Feel free to DM/email/text me to set up a time to chat if you want, too.