gray-matter
jamstack.org
gray-matter | jamstack.org | |
---|---|---|
17 | 146 | |
3,775 | 2,750 | |
- | 0.2% | |
1.2 | 6.4 | |
19 days ago | 14 days ago | |
JavaScript | Nunjucks | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gray-matter
-
Building a flat-file CMS with Angular
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
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
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
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
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
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.
-
Loading local markdown blog posts - part 12
To do this, we use the matter npm package.
-
Create a Markdown Editor with Rust and React
It’s actually not part of the CommonMark spec, so you’ll often need a 3rd party library to parse it out on top of your Markdown parser. In JavaScript we use gray-matter which converts frontmatter into a JS object we can more easily use.
-
Turn a Markdown blog to a simple SSG
Over the past few weeks, I mostly wrote on how to template a Node.js application with EJS using Express. Then, I wrote an article showing how to create a Markdown blog in Node.js using EJS, Express, gray-matter and markdown-it. Today, I'll combine those tutorials to turn the Markdown blog, from the last tutorial, into a simple SSG.
-
Markdown blog with EJS
gray-matter, to parse the front matter from the Markdown files
jamstack.org
-
How to use the multi-blog plugin for Docusaurus
Docusaurus is a Jamstack SSG (Static Site Generator) mainly intended for documentation and blog websites. It is a Meta Open Source project. Its configuration is done mainly through a JavaScript file called docusaurus.config.js.
- Ask HN: Looking for lightweight personal blogging platform
-
Top 5 Ways To Host Your Full-Stack App For Free 🚀✨
Netlify has gained popularity among developers for its ease of use and powerful features. It's a great option for hosting static websites or Jamstack applications.
-
Jamstack: A Modern Way to Build Fast and Secure Websites 🪛
Jamstack Org
- What is the logic behind integrating React with Wordpress?
-
9 Web Development Trends To Watch In 2023
Jamstack architecture continues to gain popularity as a modern web development approach that focuses on pre-rendered content served from a CDN. Some benefits of Jamstack include better performance, lower cost, and greater scalability. Expect to see growth in Jamstack frameworks like Gatsby, Next.js and Nuxt.js in 2023.
-
Is Jamstack Officially Finished?
More importantly, Netlify, the creator and stewards of the term Jamstack including it's canonical site, has largely abandoned the term as well, in favor of a "composable web" term that better aligns with their ambitions around becoming a broader enterprise platform including content (with tools like Netlify Connect).
-
Software development on a Chromebook
I have been using the hosting environment provided by Netlify for years. I am aware there are several available including Vercelli and Heroku, to name a few, but Netlify was the first I tried and it continues to work well. It links into my Git repos on BitBucket and also offers Functions-as-a-Service (FaaS) for experimentation and small projects. Netlify is also a prime advocate of the JAMStack architecture that is gaining considerable interest.
-
How do people make basic AWS sites so cost effectively? How do they limit users from making their budget insane? Am I missing something?
You should check out JamStack. The premise is that the majority of your site is static content and you can push it out to CDNs that are frequently cheap or free.
-
What and Why, Git LFS?
Perhaps this is worth checking out and utilizing when I have the time to attempt another JAMstack project. Possibly Eleventy?
What are some alternatives?
front-matter - Extract YAML front matter from strings
Gatsby - The best React-based framework with performance, scalability and security built in.
react-markdown - Markdown component for React
eleventy 🕚⚡️ - A simpler site generator. Transforms a directory of templates (of varying types) into HTML.
remark - markdown processor powered by plugins part of the @unifiedjs collective
sanity - Sanity Studio – Rapidly configure content workspaces powered by structured content
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
studio - Robotics visualization and debugging
docsify - 🃏 A magical documentation site generator.
Strapi - 🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
next-markdown-blog - A lightly opinionated, full-featured Next.js blog managed through Git Workflows with markdown files.
vscode-azure-blockchain-ethereum - Blockchain extension for VS Code