This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install dependency: npm install storyblok-js-client | |
const StoryblokClient = require('storyblok-js-client') | |
// This token allows CRUD operations to all your spaces and can be found in the | |
// "my account" section of our app: https://app.storyblok.com/#!/me/account | |
// DO NOT COMMIT THAT OAUTHTOKEN!! | |
const oauthToken = 'your_oauth_token' | |
// Initialize the client with the oauth token | |
const Storyblok = new StoryblokClient({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: `<div> | |
<input class="uk-width-1-1 uk-margin-small-bottom" v-model="search" placeholder="Search" @input="searchStories" /> | |
<select multiple="true" class="uk-width-1-1" v-model="selected"> | |
<option v-for="(story, index) in stories" v-bind:key="story.uuid" :value="story.uuid">{{story.name}}</option> | |
</select> | |
<button class="uk-width-1-1 uk-margin-top uk-button-primary uk-button" @click="saveSelection">Save</button> | |
</div>`, | |
data() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"events": [ | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install sanitize-html | |
const sanitizeHtml = require('sanitize-html'); | |
// npm install storyblok-js-client | |
const StoryblokClient = require('storyblok-js-client') | |
// Storyblok is now available as variable which contains the richTextResolver functionality | |
const Storyblok = new StoryblokClient({}) | |
function createMarkup(storyblokHTML) { | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StoryblokClient require('storyblok-js-client') | |
const createDOMPurify = require('dompurify') | |
const { JSDOM } = require('jsdom') | |
// Storyblok is now available as variable which contains the richTextResolver functionality | |
const Storyblok = new StoryblokClient({}) | |
// For Node this needs to use the jhttps://github.com/cure53/DOMPurify#okay-makes-sense-lets-move-on | |
const jsDomWindow = new JSDOM('').window; | |
const DOMPurify = createDOMPurify(jsDomWindow); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import StoryblokClient from 'storyblok-js-client' | |
// Storyblok is now available as variable which contains the richTextResolver functionality | |
const Storyblok = new StoryblokClient({}) | |
function createMarkup(storyblokHTML) { | |
return { | |
__html: Storyblok.richTextResolver.render(storyblokHTML), | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Storyblok = require('storyblok-js-client') // npm install storyblok-js-client | |
const MAPI_TOKEN = "your_oauth_token" | |
const spaceId = 73358 // your configured space id folder | |
const yourFolderId = 5663791 // your parent folder | |
let StoryblokClient = new Storyblok({ | |
oauthToken: MAPI_TOKEN | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 2, | |
"builds": [ | |
{ | |
"src": "nuxt.config.js", | |
"use": "@nuxtjs/now-builder", | |
"config": {} | |
} | |
], | |
"routes": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.......................................................................................................... | |
.......................................................................................................... | |
...............................*.......................................................................... | |
............................Y@@@@Y.....................................E@@@@E............................. | |
...........................E@@WR@@@...................................E@@WW@@@*........................... | |
.........................E@@@GGGG@@W.................................:@@WGGGW@@Y.......................... | |
........................Y@@WGGGGGR@@E................................@@QGGGGGW@@G......................... | |
.......................E@@WGGGGGGGW@@:..........*YEYEEEE*...........@@@GGGGGGGG@@@........................ | |
......................R@@GGGGGGGGGGQ@@...EEG@@@@@@@@@@@@@@@@@REY:..Y@@GGGGGGGGGGQ@@....................... | |
.....................G@@GGGGGGGGGGGG@@@@@@WWWWGGGGGGGGGGGGGRW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios') | |
const fs = require('fs') | |
const netrc = require('netrc') | |
const os = require('os') | |
const path = require('path') | |
const host = 'api.storyblok.com' | |
const args = process.argv | |
let space = '' | |
args.forEach((arg) => { |
NewerOlder