Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
gatsby-plugin-folder-metadata
Advanced tools
While building a large and complex website, I ran into a situation where I wanted to be able to have metadata that applied to every file within a folder. This plugin reads in `metadata.json` files and adds them to the `metadata.data` field on Gatsby `File
While building a large and complex website, I ran into a situation where I
wanted to be able to have metadata that applied to every file within a folder.
This plugin reads in metadata.json
files and adds them to the metadata.data
field on Gatsby File
nodes.
If a parent folder has metadata, it's included under the metadata.parent
field. This allows a single node to respond to all metadata that may be
relevant. For instance, this allows metadata to be used to assign a different
path to be used when generating pages from a folder's contents.
For instance, for .mdx
files, you can query the metadata generated by this
plugin with
query YourQuery {
allMdx {
edges {
node {
parent {
... on File {
fields {
metadata {
data {
your
json
keys
}
}
}
}
}
}
}
}
}
It's verbose and a little awkward, but it means that the only requirement for
using this plugin is using source plugins that generate File
nodes. This lets
it compose well with other plugin without knowledge of them.
FAQs
While building a large and complex website, I ran into a situation where I wanted to be able to have metadata that applied to every file within a folder. This plugin reads in `metadata.json` files and adds them to the `metadata.data` field on Gatsby `File
The npm package gatsby-plugin-folder-metadata receives a total of 0 weekly downloads. As such, gatsby-plugin-folder-metadata popularity was classified as not popular.
We found that gatsby-plugin-folder-metadata 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.