
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
gatsby-plugin-prefix
Advanced tools
Use prefix today, save time tomorrow
npm install gatsby-plugin-prefix
In gatsby-config.js
:
module.exports = {
plugins: [
...otherPlugins,
{
resolve: "gatsby-plugin-prefix",
options: {
tag: "tags",
category: "categories",
blog: "articles",
},
},
],
};
function() -> obj
This is a React hook that gives you access to the prefix objects that you declared when registering the plugin.
function MyComponent() {
const { tag, category, blog } = usePrefix();
console.log(tag); // --> tags
console.log(category); // --> categories
console.log(blog); // --> articles
return <>{...}</>
}
This plugin creates a Prefix
Gatsby node type. When working inside Gatsby lifecycle (createPages
, sourceNodes
, etc), you can run a Gatsby GraphQL to get the prefix data:
query {
allPrefix {
nodes {
name
value
}
}
}
MIT
FAQs
Use prefix today, save time tomorrow
The npm package gatsby-plugin-prefix receives a total of 0 weekly downloads. As such, gatsby-plugin-prefix popularity was classified as not popular.
We found that gatsby-plugin-prefix 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.