Summary: Storyblok is the headless CMS behind the 7Mind marketing website website-next-js: landing, campaign, B2B and legal pages, magazin, podcast and wissen. The site is a static export, so Storyblok is read at build time and a publish goes live only after a new Cloudflare Pages build. Sources: direct code inspection of website-next-js origin/main on 2026-11-09 (lib/storyblok/, pages/[locale]/[…slug].tsx, pages/storyblok-preview.tsx, docs/storyblok-preview.md, DEPLOY.md, public/_redirects, functions/_middleware.ts, lib/redirects/static.ts, lib/i18n/sectionSlugs.ts); Nuxt-era details from nuxt.config.ts, pages/storyblok.vue, middleware/redirects.js, store/storyblok.js in 7mind-web-v2 Last updated: 2026-11-09
Role in the system
Storyblok is the source of truth for editorial content on the public web. It does not own login, signup or checkout: those live in frontend-public-pages, whose checkout content comes from the 7NXT Contentful setup. The old 7Mind checkout pages built in Storyblok were not migrated.
There is one Storyblok space. It also served 7Sleep until 7Sleep was sunset. There is no separate staging space; published vs draft is the only environment-like distinction.
What Storyblok owns
- Landing pages (
landing-pages/), including the German home page - International landing pages (
international-pages/), including the non-German home pages (home-page-us,home-page-frand so on) - Campaign pages (
campaigns/) - Multiplier and B2B pages (
multiplier-pages/,b2b-pages/) - Legal pages (
legal-pages/) - Magazin articles (
magazin/<language>/), podcast episodes and wissen posts - Global components (
global/)
Not owned any more: redirects (see below) and the krankenkasse pages, which are built from lib/krankenkasse/insurances*.json and the message catalogue in the repo.
How content gets rendered
- At build time,
lib/storyblok/catchAllIndex.tsreadscdn/linksandcdn/stories(published) and builds the list of public paths per locale. It uses each story’sreal_pathand, where a locale has a published translated slug, the translated path. pages/[locale]/[...slug].tsxandpages/[locale]/index.tsxprerender one HTML file per (locale, path).lib/storyblok/fetchStory.tsfetches each story withversion: 'published'in production builds and maps the locale to a Storyblok language (ustoen-us,uktoen-gb,catoen-ca; German is the default dimension). A story with alanguageswhitelist is only built for those locales.- Magazin, podcast and wissen have their own routes (
pages/[locale]/magazin/[post].tsxand so on). Magazin content is folder-based:magazin/de/,magazin/fr/, andmagazin/en/for the English domains. Seelib/i18n/sectionSlugs.ts. - The page renders the story’s sections through
components/storyblok/StoryblokRoute.tsxandLandingPage/LegalPage. Each blok’scomponentname is looked up inlib/storyblok/components.ts. - The magazin list bloks are prefetched at build time (
lib/storyblok/prefetch.ts) and only query Storyblok from the browser for search and pagination. The podcast list bloks (podcastLastEntries,podcastPreviewSection) still fetch from Storyblok in the browser.
Preview for editors
The Storyblok Visual Editor points at a second Cloudflare Pages project built from the same repo (docs/storyblok-preview.md):
- Build command
yarn build:preview. It prerenders nothing and turnsout/into a single-page app aroundpages/storyblok-preview.tsx. PREVIEW_SPA=1on that project switches off the host to locale routing infunctions/_middleware.ts. Without it the preview loops in redirects.- The page fetches the draft story in the browser (
lib/storyblok/previewFetch.ts) and renders it through the sameStoryblokRoutepipeline as production. Landing pages update live on every edit; legal pages render the draft but do not live-update. - It needs a Storyblok preview token, not the public token the production build uses. The intended host is
preview.6mind.de. - Checkout, coupon and form copy in the preview is always German.
Publishing and going live
- New or changed content is not on the site until the next Pages build of
main. A build takes several minutes.DEPLOY.mddescribes two ways to start one: a push tomain, or a Storyblok “Story published” webhook pointed at a Cloudflare Pages deploy hook. - The build fetches every story, throttled to 3 requests per second by default (
STORYBLOK_RATE_LIMIT,lib/storyblok/client.ts). Without the throttle the build ran into the CDN rate limit and shipped a truncatedout/.
Redirects
Redirect stories in the Storyblok redirects/ folder have no effect on the Next.js site. The build only excludes them from the page list (isExcludedCatchAllSlug in lib/storyblok/fetchPages.ts). Live redirects are in the repo:
public/_redirects(Cloudflare Pages redirect file, capped at 100 dynamic rules)functions/_middleware.ts(the/ento7mind.app301s, locale-prefix 301s, and the login and password-reset 302s toapp.<domain>)
lib/redirects/static.ts holds the redirect table ported from the Nuxt middleware/redirects.js, but only proxy.ts imports it, and proxy.ts does not run in a static export. A new redirect needs a code change, not a Storyblok edit.
What agents should know
- Storyblok is a build-time dependency. If it fails during a build,
catchAllIndex.tslogs an error and returns an empty index. The build still succeeds and can ship without the catch-all pages, because the coverage audit at the end ofyarn buildonly reports gaps and never fails the build. After a Storyblok incident, check the build log before trusting a deploy. - Adding a blok means creating the component in Storyblok and adding an entry with the exact same name to
lib/storyblok/components.ts. React does not apply Vue’s case aliases, so some bloks are registered under two spellings. A missing entry shows up as a “Component X doesn’t exist” warning in the build log. - Slugs that dedicated routes own (account, login, password reset, coupon, purchase, krankenkasse, magazin and others) are excluded from the catch-all in
isExcludedCatchAllSlug. A Storyblok story with one of those slugs is ignored. Adding a new hard-coded page means adding its slugs there, otherwise the build fails with “Conflicting paths returned from getStaticPaths”. See locale-aware-slugs-static-export. - Several stories in different folders can publish to the same public path (for example
campaigns/stressandinternational-pages/stress). The catch-all keeps every candidate and serves the first one that is renderable in that locale. - The folder prefixes (
landing-pages,legal-pages,campaigns,podcast,multiplier-pages,b2b-pages,international-pages) decide whether a story is served at itsreal_path. They are load-bearing.
Legacy: the Nuxt consumer
nuxt-website used @storyblok/nuxt-2 (token in NUXT_ENV_STORYBLOK_TOKEN, memory cache). It enumerated slugs at build time only for the sitemap and fetched each story at request time in pages/_dynamicPage/, storing it in a Vuex module. Preview ran on pages/storyblok.vue, and Storyblok stories under redirects/ fed its redirect middleware. None of this runs any more. The Next.js port copied the folder prefixes and the slug exclusions from its fetchStoryblokPages(), which is why the content model looks the way it does.
Related
- website-next-js — the consumer of Storyblok (static export on Cloudflare Pages)
- nuxt-website — the legacy consumer
- locale-aware-slugs-static-export — the hard-coded pages that the catch-all must not claim
- dual-brand-routing — brand awareness was layered on top of a single Storyblok space while 7Sleep existed
- multi-domain-hostname-rewriting — Storyblok content is not domain-aware; the host to locale mapping happens in the Pages middleware