
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@leonardodino/gatsby-plugin-page-creator
Advanced tools
Gatsby plugin that automatically creates pages from React components in specified directories
Gatsby plugin that automatically creates pages from React components in specified directories. Gatsby
includes this plugin automatically in all sites for creating pages from components in src/pages
.
With this plugin, any file that lives in the src/pages
folder (or subfolders) will be expected to export a React Component to generate a Page. The following files are automatically excluded:
template-*
__tests__/*
*.test.jsx?
*.spec.jsx?
*.d.tsx?
*.json
*.yaml
_*
.*
npm install --save gatsby-plugin-page-creator
// gatsby-config.js
module.exports = {
plugins: [
// You can have multiple instances of this plugin
// to create pages from React components in different directories.
//
// The following sets up the pattern of having multiple
// "pages" directories in your project
{
resolve: `gatsby-plugin-page-creator`,
options: {
path: `${__dirname}/src/account/pages`,
},
},
{
resolve: `gatsby-plugin-page-creator`,
options: {
path: `${__dirname}/src/settings/pages`,
},
},
// You can also provide "createPath" and "validatePath" functions
// to override default behaviour, if needed
{
resolve: `gatsby-plugin-page-creator`,
options: {
path: `${__dirname}/src/articles`,
createPath: (basePath, filePath) => {
// Creates a custom URL based on filename
return `/articles/${slugify(basename(filePath))}/`
},
validatePath: (relativePath, isValid) => {
// Filter page creation based on criteria,
// the second argument is the default validatePath function
if (!isValid(relativePath)) return false
if (basename(relativePath).startsWith("draft-")) return false
return true
},
},
},
],
}
FAQs
Gatsby plugin that automatically creates pages from React components in specified directories
We found that @leonardodino/gatsby-plugin-page-creator 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 uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.