Socket
Socket
Sign inDemoInstall

markdownlayer

Package Overview
Dependencies
19
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    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


Version published
Weekly downloads
207
decreased by-15.85%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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, this is built to replace it.

Getting Started

Explore the example projects, which you can clone to try out locally.

Read the blog.

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).
  • No JSON/YAML content as they can be loaded directly into the JS/TS code.

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/63051, of if there is a new idea before then.

Who is using Markdownlayer?

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

FAQs

Last updated on 29 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc