Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
gatsby-source-storyblok
Advanced tools
Gatsby source plugin for building websites using the Storyblok headless CMS as a data source.
This is a Gatsby source plugin for building websites using the Storyblok headless CMS with true visual preview as a data source.
npm install --save gatsby-source-storyblok
module.exports = {
plugins: [
{
resolve: 'gatsby-source-storyblok',
options: {
accessToken: 'YOUR_TOKEN',
homeSlug: 'home',
version: 'draft'
}
}
]
}
accessToken
: Your Storyblok draft tokenhomeSlug
: The slug of the "home" story. Used to get the content at the root level /version
: 'draft' or 'published'timeout
: Optionally provide a timeout for the api requestresolveRelations
: Resolve relationships to other Stories (in the first level of nesting) of a multi-option or single-option field-type. Provide the field key(s) as array to resolve specific fields. Example: ['related_articles', 'author'].includeLinks
: If 'true' you can query links by allStoryblokLinkEntry. The links query lets you create a dynamic navigation tree as it includes also content folders.To get all entries unfiltered you can do the following query:
{
allStoryblokEntry {
edges {
node {
id
name
created_at
published_at
uuid
slug
full_slug
content
is_startpage
parent_id
group_id
}
}
}
}
The following example shows a filter to get all items from a news folder:
{
allStoryblokEntry(filter: {full_slug: {regex: "/^news\//"}}) {
edges {
node {
name
full_slug
}
}
}
}
If you use field level translations you can filter for a specific language using following query:
{
allStoryblokEntry(filter: {lang: {eq: "de"}}) {
edges {
node {
name
full_slug
}
}
}
}
Every field of your content types is available via the prefix field_
.
This lets you for example to query for a specific component:
{
allStoryblokEntry(filter: {field_component: {eq: "page"}}) {
edges {
node {
name
full_slug
}
}
}
}
{
storyblokEntry(slug: { eq: "global-navi" }) {
content
}
}
allStoryblokDataSourceEntry {
edges {
node {
id
name
value
data_source
}
}
}
Use the links api to create a dynamic navigation tree.
allStoryblokLinkEntry {
edges {
node {
id
uuid
slug
parent_id
name
is_folder
published
is_startpage
position
}
}
}
FAQs
SDK to integrate Storyblok into your project using Gatsby.
The npm package gatsby-source-storyblok receives a total of 4,030 weekly downloads. As such, gatsby-source-storyblok popularity was classified as popular.
We found that gatsby-source-storyblok demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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 a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.