![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
gatsby-remark-extract-keywords-jieba
Advanced tools
Extract keywords (for SEO, display, etc) on all remark nodes.
Extract most important keywords from your content using Natural tf-idf. From their docs:
Term Frequency–Inverse Document Frequency (tf-idf) is implemented to determine how important a word (or words) is to a document relative to a corpus. The following formulas are used for calculating tf and idf:
- tf(t, d) is a so-called raw count, so just the count of the term in the document
- idf(t, D) uses the following formula: 1 + ln(N / (1 + n*t)) where N is the number of documents, and n_t the number of documents in which the term appears. The 1 + in the denominator is for handling the possibility that n_t is 0.
In our context, N
is just 1, your page/post content.
Supports both MD and MDX format.
npm install --save gatsby-remark-extract-keywords
or
yarn add gatsby-remark-extract-keywords
It has gatsby as peerDependency
.
In your gatsby-config.js
:
plugins: [
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [`gatsby-remark-extract-keywords`],
},
},
];
This creates a new field on each MD/MDX node called keywords
, you can use it on your GraphQL query:
query ListingQuery {
allMarkdownRemark(sort: {fields: [frontmatter___date], order: DESC}) {
edges {
node {
id
frontmatter {
title
}
fields {
keywords
}
}
}
}
}
blacklist
option as functionThis will only return keywords with keyword length higher than 5.
const filterKeywords = term => term.length > 5;
plugins: [
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-extract-keywords`,
options: {
blacklist: filterKeywords,
},
},
],
},
},
];
Option | Description |
---|---|
max | Maximum number of keywords to return |
blacklist | String, array of strings or function to blacklist terms. If function, is used as filter parameter. |
Thanks goes to these wonderful people (emoji key):
Eduardo Reveles 💻 📖 🤔 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Extract keywords (for SEO, display, etc) on all remark nodes.
The npm package gatsby-remark-extract-keywords-jieba receives a total of 2 weekly downloads. As such, gatsby-remark-extract-keywords-jieba popularity was classified as not popular.
We found that gatsby-remark-extract-keywords-jieba demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.