Skip to content

Commit

Permalink
Added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Mar 6, 2024
1 parent 962144f commit f8ebc7d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spotty-dogs-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"markdownlayer": patch
---

Added README.md
6 changes: 6 additions & 0 deletions .vscode/ltex.dictionary.en-US.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ Vercel
TailwindCSS
NextJS
markdoc
Markdoc
NextJs
markdownlayer
frontmatter
rehype
Markdownlayer
1 change: 0 additions & 1 deletion README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
37 changes: 37 additions & 0 deletions packages/markdownlayer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Markdownlayer [![](https://badgen.net/npm/v/markdownlayer)](https://www.npmjs.com/package/markdownlayer)

Markdownlayer is a content SDK that validates and transforms your content into type-safe JSON data you can easily `import` into your application's pages. If you know how to or have used [Contentlayer](https://github.com/contentlayerdev/contentlayer), this is built to replace it.

## Getting Started

Explore the [example projects](/examples), which you can clone to try out locally.

## Features

- Live reload on content changes
- Fast and incremental builds
- Simple but powerful schema DSL to design your content model (validates your content and generates types)
- Auto-generated TypeScript types based on your content model (e.g. frontmatter or CMS schema)

## Differences from contentlayer

- Markdoc support
- The content type is inferred from the extension hence markdown is processed correctly and not forced into MDX
- Remark GFM, Admonitions, Reading Time, Emoji, and Slug included by default.
- Last update time and author based on Git but can be overridden via frontmatter.
- Supply configuration in next.config.js as an alternative to markdownlayer.config.js
- Only local content (no notion sources yet)
- Only NextJs support (no Remix yet)

## Known issues

- Requires ESM because the whole unified/remark/rehype ecosystem moved to ESM-only.
- Due to the ESM-only requirement, there is a webpack warning on build/dev. This will be resolved once next.config.ts is supported in <https://github.com/vercel/next.js/pull/57656>, of if there is a new idea before then.

### Who is using Markdownlayer?

- [maxwellweru.com](https://maxwellweru.com)([Source](https://github.com/mburumaxwell/website))
- [tingle.software](https://tingle.software)
- [falu](https://falu.io)

Are you using Markdownlayer? You can add your page (and repo) to the end of the list via a PR. 🙏

0 comments on commit f8ebc7d

Please sign in to comment.