Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
gatsby-paginated-collection-json-files
Advanced tools
Plugin for gatsby-plugin-paginated-collection which writes paginated data to JSON files
Readme
Writes JSON files for a collection made by gatsby-plugin-paginated-collection
to a site's public
folder.
The files can be fetched as needed client-side.
npm install --save gatsby-paginated-collection-json-files
// In your gatsby-config.js
plugins: [
{
resolve: 'gatsby-source-paginated-collection',
options: {
// In addition to your other options...
plugins: [
{
resolve: 'gatsby-paginated-collection-json-files',
options: {
/**
* Path within the site's public folder to which the plugin will
* write files. Default: 'paginated-collections'
*/
path: 'paginated-collections',
/**
* Include data for the next or previous page or the collection
* itself. All fields except `nodes` will be included if expanded.
* The following fields can be expanded: nextPage, previousPage,
* collection. Default: no fields
*/
expand: ['nextPage', 'previousPage'],
/**
* Configure the filename of the JSON files. The following values
* are valid:
* - "id": ID of the page
* - "index": Index of the page
* - A function that returns a string. e.g. (page) => page.id
*
* Default: 'id'
*/
filename: 'id',
},
},
],
},
},
]
Each page in the collection is saved as a JSON file named ${id}.json
where
${id}
is the page's ID. You can get a page's ID by querying for the page' node
directly or by using a page's nextPage
or previousPage
fields.
The following query fetches the ID of the first page of a collection named
blogPosts
. It also fetches the next page's ID which can be used in a
client-side fetch
to load the JSON file.
{
paginatedCollectionPage(
collection: { name: { eq: "blogPosts" } }
index: { eq: 0 }
) {
id
nextPage {
id
}
}
}
FAQs
Plugin for gatsby-plugin-paginated-collection which writes paginated data to JSON files
The npm package gatsby-paginated-collection-json-files receives a total of 6 weekly downloads. As such, gatsby-paginated-collection-json-files popularity was classified as not popular.
We found that gatsby-paginated-collection-json-files 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.