Coder Social home page Coder Social logo

misinc / quickstart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from storyblok/quickstart

0.0 1.0 0.0 159 KB

:rocket: Quickstart for Storyblok

Home Page: https://www.storyblok.com

License: MIT License

JavaScript 38.18% CSS 6.53% Liquid 55.29%

quickstart's Introduction

Quickstart for Storyblok



Getting started

After cloning this repo:

  1. Create a space in Storyblok and choose advanced settings to choose the option "Hosted/Rendering service" and then "Quickstart"
  2. In your config.js fill in the parameters INSERT_SPACE_ID and INSERT_YOUR_DOMAIN
  3. Rename _token.js to token.js and insert your "theme" token (which you can find in the Storyblok dashboard).
  4. Fire up your dev environment
$ cd ./project && npm i && npm run dev
  1. Add your dev environment 'http://localhost:4440/' to the environment settings

Commands

In the background we're using gulp so you can change all the commands below and adopt them to your need.

# Start you local dev environment on port 4440
$ npm run dev

# Build static assets (styles, scripts)
$ npm run build

# Sync your current state on the dev environment
$ npm run deploy:dev

# Sync your current state on the live environment
$ npm run deploy:live

Frequently Ask Questions

How can I load stories to create an overview for (news|articles|projects|...):

You can simply use following snippet to load all the stories from a specific folder according to the folder's slug like:

{% set newsitems from stories starts_with:'news', per_page: 3 %}
{% for news in newsitems.data %}
    {{ news.name }}
{% endfor %}

I used the Weblink/Storylink field type - How can I get the link in the template?

You will receive the actual path by using the url filter:

{{ blok.your_field_key | url }} <!-- Outputs a link, giving a link object -->

I uploaded a static file in the views/assets folder how can I reference that?

We've prepared the asset_url filter for that:

{{ 'assets/js/scripts.js' | asset_url }} <!-- Outputs the theme url -->

Is there a full documentation about those filters and other possibilities?

Sure! You can find them right here:



Storyblok Logo

quickstart's People

Contributors

onefriendaday avatar dominikangerer avatar

Watchers

Karim Ardalan 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.