Code Monkey home page Code Monkey logo

full-static-nuxt-storyblok's Introduction

Full Static with NuxtJS and Storyblok

A boilerplate project designed to demonstrate the benefits of using Jamstack and the easy configuration of a project with NuxtJS and Storyblok.

Storyblok space Setup

In this section we are going to look at how to define the component schemas needed for this project in our Storyblok space. What properties, type of fields, we have in each one and, finally, we will see an example of using these components to create a new page.

Create an account and start an space in Storyblok

Go to app.storyblok.com, select Sign up and create an account. When it's ready, create an empty space and follow the next steps.

Blocks schema

Components and templates at Storyblok Full Static site

Content type

1. Page template

Field Name Field Type Options
title Text
body Blocks Allow only specific components to be inserted: Groups -> Organisms

Page template Storyblok schema

Body

Body block options

Nestable Molecules

1. Heading Section

Field Name Field Type
subtitle Text
title Text
intro Textarea

Heading Section Storyblok schema

2. Benefit Card

Field Name Field Type Options
icon Asset Images
color Single-Option Source: self; Options (name/value): orange/orange, purple/purple, blue/blue, green/green
name Text
description Textarea

Benefit Card Storyblok schema

Color single-option definition:

Benefit Card Color single-option definition

3. Tech Card

Field Name Field Type Options
logo Asset Images
name Text
url Link

Tech Card Storyblok schema

Nestable Organisms

1. Benefits

Field Name Field Type Options
heading Blocks Allow only specific components to be inserted: Component -> Heading Section (1 max)
benefits Blocks Allow only specific components to be inserted: Component -> Benefit Card (6 max)

Benefits Storyblok schema

Heading Benefits
Heading Blocks definition Benefits Blocks definition

2. Tech Stack

Field Name Field Type Options
heading Blocks Allow only specific components to be inserted: Component -> Heading Section (1 max)
stack Blocks Allow only specific components to be inserted: Component -> Tech Card

Tech stack Storyblok schema

Heading Benefits
Heading Blocks definition Tech card Blocks definition

Components use case: Homepage

For the homepage we will fill in the title field and choose the organisms we want in the body.

In this example, as in the live demo, we'll add Benefits and Tech Stack organisms.

Homepage template filled with title and body organisms

And this is how the home Config tab will look like:

Page template configuration in Storyblok

For the organisms, let's see which blocks to add to them:

Benefits Organism Content

1. Adding a Heading Section molecule

Adding a heading section to the Benefits organism

2. Adding Benefit Card molecules

Adding a benefit card to the Benefits organism

Tech Stack Organism Content

1. Adding a Heading Section molecule

Adding a heading section to the Tech Stack organism

2. Adding Tech Card molecules

Adding a tech card to the Tech Stack organism

Frontend Build Setup

# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate

For detailed explanation on how things work, check out Nuxt.js docs.

full-static-nuxt-storyblok's People

Contributors

dawntraoz avatar

Stargazers

Jose Hernandez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.