This file contains hidden or 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
<template> | |
<section class="util__container"> | |
<h1>Cache Cleared</h1> | |
<br> | |
<p>Old Cache Version: {{oldCacheVersion}}</p> | |
<p>New Cache Version: {{newCacheVersion}}</p> | |
</section> | |
</template> | |
<script> |
This file contains hidden or 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
methods: { | |
... | |
storyblokImageUpload(fileblob, filename, success, failure) { | |
this.api.client.post( | |
`/spaces/${this.spaceId}/assets`, | |
{ filename: filename }, | |
{ headers: { Authorization: this.options.oauthToken } }, // uses the option with the name `oauthToken` which needs to be configured in the schema definition of the field you're using the plugin in. | |
).then((response) => { | |
let request = new XMLHttpRequest() |
This file contains hidden or 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 storyblok-js-client | |
const StoryblokClient = require('storyblok-js-client') | |
// Initialize the client with the oauth token so you're | |
// authenticated for the management API | |
const Storyblok = new StoryblokClient({ | |
oauthToken: 'YOUR_OAUTH_TOKEN' | |
}) | |
const spaceId = 'your_space_id' | |
let page = 1 |
This file contains hidden or 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], | |
data() { | |
return { | |
ich_bin_eine_state_variable_die_nicht_im_model_beinhaltet_ist: true, | |
ich_darf_nicht_model_heissen: true | |
} | |
}, | |
template: `<div> | |
<input class="uk-width-1-1" v-model="model.example" /> |
This file contains hidden or 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> | |
<markdown-field :uid="uid" :model="model.original" :schema="schema" @changed="update" key="original"></markdown-field> | |
</div>`, | |
methods: { | |
initWith() { | |
return { | |
plugin: 'markdown-html', | |
original: '', |
This file contains hidden or 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 storyblok-js-client | |
const StoryblokClient = require('storyblok-js-client') | |
// Initialize the client with the oauth token so you're | |
// authenticated for the management API | |
const Storyblok = new StoryblokClient({ | |
oauthToken: 'YOUR_OAUTH_TOKEN' | |
}) | |
const start = async () => { |
This file contains hidden or 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
<template> | |
<section class="util__container"> | |
<component v-if="story.content.component" :key="story.content._uid" :blok="story.content" :is="story.content.component"></component> | |
</section> | |
</template> | |
<script> | |
export default { | |
data () { | |
return { story: { content: {} } } |
This file contains hidden or 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
// Option 1 | |
// if you know that you only want 2 | |
let per_page = 100 | |
let responses = await Promise.all([ | |
app.$storyapi.get('cdn/stories/', { | |
starts_with: 'posts/', | |
per_page: per_page, | |
page: 1 | |
}), | |
app.$storyapi.get('cdn/stories/', { |
This file contains hidden or 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
[ { "name":"1" ,"value":"Stefan Fuchs.png" } ,{ "name":"3" ,"value":"Stefan Fuchs.png" } ,{ "name":"4" ,"value":"heaven.jpg" } ,{ "name":"5" ,"value":"heaven.png" } ] |
This file contains hidden or 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 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({ |