
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
gatsby-plugin-prismic-preview
Advanced tools
Enable previews of your prismic documents
Install module
npm install --save gatsby-plugin-prismic-preview
Add plugin to gatsby-config.js:
{
resolve: 'gatsby-plugin-prismic-preview',
options: {
repositoryName: 'gatsby-source-prismic-test-site',
linkResolver: require('./src/linkResolver'),
path: '/preview',
}
}
repositoryNameShould be the same as the one in gatsby-source-prismic plugin
linkResolverInline function
options: {
linkResolver(doc) {
if (doc.type === 'BlogPost') {
return `/blog/${doc.uid}`;
}
return `${doc.type}`;
},
},
or a require to a specific file (must be ES5 module.exports format)
options: {
linkResolver: require('./src/utils/linkResolver'),
},
Where the preview page should live.
Defaults to /preview.
Only allow previews on staging? In gatsby-config.js do a conditional operation:
const plugins = [
'plugin-1',
'plugin-2',
];
if (process.env.NODE_ENV === 'staging') {
plugins.push({
resolve: 'gatsby-plugin-prismic-preview',
options: {}
});
}
module.exports = {
siteMetadata: {
title: 'Gatsby Default Starter',
},
plugins,
};
FAQs
Enable previews for gatsby-source-prismic
We found that gatsby-plugin-prismic-preview 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.