Time for Storyblok - Connecting it to nuxt

To pull content I will be using @storyblok/nuxt which is an official plugin for nuxt. The setup is easy enough:

  1. yarn add @storyblok/nuxt

  2. Adding it to nuxt.config.ts

    import { defineNuxtConfig } from "nuxt";
    
    export default defineNuxtConfig({
      buildModules: ["@storyblok/nuxt"],
      storyblok: {
        accessToken: ""
      }
    });
  3. Add components that correspond to Stories in storyblok.

  4. For individual stories, I can use const story = await useStoryblok("{{story_slug}}", { version: "draft" }); to pull the data.

  5. For lists of stories (as far as I can tell), I need to use useStoryblokApi() to pull all the stories with "starts_with" as described in the API docs.

For the list of stories, I sadly cant use the built-in features at all. It doesn't allow me to input the slug into the component and other limitations. To combat this, I will use nr 5 to pull the data, but when I have received the stories i will map them as i did with the old cms.

I have now successfully pulled the first information from Storyblok.