Gathering detailed insights and metrics for gray-matter-loader
Gathering detailed insights and metrics for gray-matter-loader
Gathering detailed insights and metrics for gray-matter-loader
Gathering detailed insights and metrics for gray-matter-loader
Webpack loader for extracting front-matter using gray-matter - https://www.npmjs.com/package/gray-matter
npm install gray-matter-loader
Typescript
Module System
Node Version
NPM Version
30.9
Supply Chain
45.1
Quality
65
Maintenance
50
Vulnerability
96.7
License
JavaScript (93.52%)
HTML (6.48%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
8 Stars
28 Commits
5 Forks
2 Watchers
28 Branches
57 Contributors
Updated on Oct 08, 2023
Minified
Minified + Gzipped
Latest Version
0.0.10
Package Id
gray-matter-loader@0.0.10
Unpacked Size
128.14 kB
Size
36.59 kB
File Count
6
NPM Version
6.4.1
Node Version
10.14.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
1
4
Webpack loader for extracting front-matter using gray-matter
Faster render: The webpack loader runs at build time to pre-compile your front matter into json files for faster loading, removing the step to convert them at run-time.
Smaller bundle: There is no need to bundle gray-matter in you application anymore. Thus, saving you ~44kb of bundle size, see bundlephobia: gray-matter
Add gray-matter-loader to your project:
1yarn add --dev gray-matter-loader
Add a rule in the webpack config of the project to use gray-matter-loader for files from which we need to extract the front-matter
1module: { 2 rules: [ 3 { 4 test: /\.md$/, 5 use: [{ loader: "gray-matter-loader" }], 6 }, 7 ]; 8}
After this, when you import file in you application you will get the parsed file in the following format:
1 "content": "Sample page content\n---\n\nRest on content from page\n", 2 "data": { 3 "title": "Sample", 4 "description": "this is sample description" 5 }, 6 "isEmpty": false, 7}
The data property of the object has the front-matter and the content of the file is the content property.
For further read please read docs for gray-matter
We have added an example project in this repo for testing. To run follow the following steps:
1git clone https://github.com/ajaymathur/gray-matter-loader.git 2cd gray-matter-loader 3yarn 4cd example 5yarn webpack --watch
Now open the index.html file in the example folder in a browser to see the output. Go ahead and edit sample.md and/ or webapck.config.js to test different use cases.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
82 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More