gray-matter

Smarter YAML front matter parser, used by metalsmith, Gatsby, Netlify, Assemble, mapbox-gl, phenomic, vuejs vitepress, TinaCMS, Shopify Polaris, Ant Design, Astro, hashicorp, garden, slidev, saber, sourcegraph, and many others. Simple to use, and battle tested. Parses YAML by default but can also parse JSON Front Matter, Coffee Front Matter, TOML Front Matter, and has support for custom parsers. Please follow gray-matter's author: https://github.com/jonschlinkert (by jonschlinkert)

Gray-matter Alternatives

Similar projects and alternatives to gray-matter

  1. Next.js

    2,330 gray-matter VS Next.js

    The React Framework

  2. Civic Auth

    Auth in Less Than 5 Minutes. Civic Auth comes with multiple SSO options, optional embedded wallets, and user management — all implemented with just a few lines of code. Start building today.

    Civic Auth logo
  3. go-unsplash

    Go Client for the Unsplash API

  4. Express

    777 gray-matter VS Express

    Fast, unopinionated, minimalist web framework for node.

  5. create-react-app

    Set up a modern web app by running one command.

  6. chakra-ui

    356 gray-matter VS chakra-ui

    Chakra UI is a component system for building SaaS products with speed ⚡️

  7. Docusaurus

    307 gray-matter VS Docusaurus

    Easy to maintain open source documentation websites.

  8. Jekyll

    :globe_with_meridians: Jekyll is a blog-aware static site generator in Ruby

  9. SurveyJS

    JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor. Add the SurveyJS white-label form builder to your JavaScript app (React/Angular/Vue3). Build complex JSON forms without coding. Fully customizable, works with any backend, perfect for data-heavy apps. Learn more.

    SurveyJS logo
  10. eleventy 🕚⚡️

    A simpler site generator. Transforms a directory of templates (of varying types) into HTML.

  11. react-hook-form

    📋 React Hooks for form state management and validation (Web + React Native)

  12. yew

    208 gray-matter VS yew

    Rust / Wasm framework for creating reliable and efficient web applications

  13. date-fns

    126 gray-matter VS date-fns

    ⏳ Modern JavaScript date utility library ⌛️

  14. marked

    69 gray-matter VS marked

    A markdown parser and compiler. Built for speed.

  15. react-markdown

    57 gray-matter VS react-markdown

    Markdown component for React

  16. markdown-it

    59 gray-matter VS markdown-it

    Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed

  17. remark

    47 gray-matter VS remark

    markdown processor powered by plugins part of the @unifiedjs collective (by remarkjs)

  18. nunjucks

    46 gray-matter VS nunjucks

    A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)

  19. Liquid

    44 gray-matter VS Liquid

    Liquid markup language. Safe, customer facing template language for flexible web apps.

  20. readable-stream

    Node-core streams for userland

  21. react-syntax-highlighter

    syntax highlighting component for react with prismjs or highlightjs ast using inline styles

  22. front-matter

    Extract YAML front matter from strings

  23. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better gray-matter alternative or higher similarity.

gray-matter discussion

Log in or Post with

gray-matter reviews and mentions

Posts with mentions or reviews of gray-matter. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-02-27.
  • Updating my website's tech stack in 2025
    5 projects | dev.to | 27 Feb 2025
    Next is shifting towards what they're calling App Router. The previous itteration, known as Pages Router is not compatible with those shiny new React Server Components I mentioned earlier. The main difference to me was using simple fetch and async/await syntax to fetch the server side props. In this case, I had a node script that relied on fs to retrieve the markdown files and a library called gray-matter to retrieve their YAML metadata properties. Then all I had to do was transform my [slug] page into an async function and call the function that fetched the posts from the filesystem.
  • Introducing docusaurus-plugin-chat-page: An AI-Powered Chat Interface for Your Documentation
    3 projects | dev.to | 22 Feb 2025
    Processes and Chunks Content: Using tools like gray-matter and remark (with strip-markdown), the plugin extracts frontmatter (such as titles and tags) and converts the Markdown into plain text. Then it splits this content into manageable chunks (with configurable maximum chunk size) while preserving metadata like file paths.
  • How to build a blog with NodeJS
    8 projects | dev.to | 31 Oct 2024
    We'll start by initializing a Node project inside a chosen folder (nodejs-blog for me) with and installing a couple of dependencies that I feel like will make our lives easier, like Express, EJS, Marked, the good ol' body-parser and gray-matter.
  • How I extend my blog with gamified learning
    3 projects | dev.to | 25 Jul 2024
    When updating the front matter I use gray-matter to make it a easy process. The code will check if there is a voice and quiz section in the event, and if so add new tags in the front matter part.
  • Building a flat-file CMS with Angular
    3 projects | dev.to | 5 Mar 2024
    Writing in markdown is super convenient, and supported by just about any text editor. To convert these .md files to browser-ready HTML, I wrote a simple little Node.js script using two great npm packages called gray-matter and showdown.
  • Eleventy vs. Next.js for static site generation
    4 projects | dev.to | 14 Dec 2023
    Next, install gray-matter to extract metadata from the front matter of markdown files, and marked to convert the markdown files to HTML:
  • Exploring the code behind Docusaurus
    4 projects | dev.to | 30 Oct 2023
    It turns out that Docusaurus uses an open source JavaScript parser called gray-matter to parse the front matter from markdown files! After installing gray-matter using npm and them importing it into the markdownUtils.ts file, all it takes is calling the matter method and passing the markdown file contents to get returned an Object with data and content (the data being the front matter and the content being the rest of the markdown file contents).
  • Create an Interactive Table of Contents for a Next.js Blog with Remark
    5 projects | dev.to | 21 Apr 2023
    Although we are building a custom table of contents, we won't have to write everything from scratch. To separate the Markdown/MDX content from the front matter, we'll use the Gray-matter package. It is optional in case you don't have front matter in your Markdown files. To process the Markdown itself, we'll use the Remark package. We'll also need the unist-util-visit package for traversing node trees and mdast-util-to-string for getting the text content of a node.
  • Create your own blog with MDX and NextJS
    2 projects | dev.to | 5 Dec 2022
    In this article we walk you through the process of creating a simple blog app using the popular React framework NextJS, gray-matter and next-mdx-remote.
  • NextJS 13 Blog Starter
    6 projects | dev.to | 14 Nov 2022
    In order to get post information (such as author, title, date, etc.) from our HTML without having them be apart of our rendered post we need a way to parse YAML front matter, this is where gray-matter comes in hand.
  • A note from our sponsor - Civic Auth
    www.civic.com | 15 May 2025
    Civic Auth comes with multiple SSO options, optional embedded wallets, and user management — all implemented with just a few lines of code. Start building today. Learn more →

Stats

Basic gray-matter repo stats
21
4,096
1.2
about 1 year ago

Sponsored
Auth in Less Than 5 Minutes
Civic Auth comes with multiple SSO options, optional embedded wallets, and user management — all implemented with just a few lines of code. Start building today.
www.civic.com

Did you know that JavaScript is
the 3rd most popular programming language
based on number of references?