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
/\A[A-Za-z0-9]+(?:(_*|-*|:)[A-Za-z0-9]+)*\z/ |
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
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<link href='//app.storyblok.com/css/index-latest.css' rel='stylesheet' type='text/css'></link> | |
<div id="root"></div> | |
<div id="page-load"><div><div></div></div></div> | |
<script type="text/javascript" src="//app.storyblok.com/js/app-latest.js"></script> | |
</body> | |
</html> |
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
module.exports = { | |
watch: { | |
'model': { | |
handler: function (value) { | |
this.$emit('changed-model', value) | |
}, | |
deep: true | |
} | |
}, | |
created: function() { |
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 StoryblokClient = require('storyblok-js-client') | |
let Storyblok = new StoryblokClient({ | |
accessToken: 'YOUR_TOKEN' | |
}) | |
let lastPage = 1 | |
for (var i = 1; i <= lastPage; i++) { | |
await Storyblok.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
// Simple backup example in node.js | |
// | |
// How to use: | |
// npm install storyblok-js-client | |
// | |
// Create the folder 'backup' | |
// | |
// Create the file 'backup.js' and execute | |
// node ./backup.js |
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
// About | |
// This script exports all stories as XML in a specific folder | |
// ------- | |
// How to install? | |
// 1. Create a folder for the project and inside a "data" folder | |
// 2. $ npm init | |
// 3. $ npm install storyblok-js-client --save | |
// 4. Exchange SPACE_ID and TOKEN and startWith | |
// 5. $ node index.js |
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
app.get('/*', function(req, res) { | |
var path = url.parse(req.url).pathname; | |
path = path == '/' ? 'home' : path | |
Storyblok | |
.get(`stories/global`, { | |
version: req.query._storyblok ? 'draft': 'published' | |
}) | |
.then((response) => { | |
Storyblok |
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
url: function(storylink) { | |
return storylink.cached_url | |
} |
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
// define a new content type "app" | |
{ | |
"_uid": "autogenerated-uid", | |
"additionalAuthors": ["Global Tracking", "Fresh Produce"], // needs to be a multi option field | |
"author": "Supply Chain", // needs to be a single option field | |
"badges": [ | |
"complete", | |
"token", | |
"featured", | |
"hot" |
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
<script> | |
import Util from './libs/Utils' | |
import App from './App.html' | |
import axios from 'axios' | |
import _ from 'lodash' | |
export default { | |
template: Util.template('#searchblok-app', App), | |
name: 'searchblok', | |
props: ['settings'], |