问题标签 [storyblok]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 未使用 nuxt 和 storyblok 呈现数据
嘿。我正在使用 nuxt 创建一个网站,并使用 Storyblok 作为 CMS。我已经做了 2 页,通过它传递数据并且工作正常。现在我有一个(我正在创建一个唱片页面)数据在那里(当我控制台时)但没有呈现任何东西......
所以我尝试在 asyncData 中控制数据并显示出来。我尝试添加我以前使用过的其他组件,它工作得很好..
这是我的组件
以及它呈现的页面:
javascript - Netlify Deployment (Nuxt - Storyblok CMS project) failure. `Failed during stage 'building site': Build script returned non-zero exit code: 1`
Solved! Look bellow for more details. (It was a typo mistake)
I am trying to Deploy a project in Netlify as Static using npm run generate
but I am getting an error of failed during stage 'building site': Build script returned non-zero exit code: 1
. I have previously deployed 2 other projects in Netlify (they weren't using Storyblok, only Nuxt) and I haven't had such an error before.
The project uses Nuxt Js (Vue Js framework), Vuetify and Storyblok Headless CMS with asyncData
methods calling the requests. I have implemented it the way Storyblok's documentation says, especially the generation of the routes in nuxt.config.js
, the dynamically change of the version
(draft - published), using the storyblok-nuxt
module for the requests, setting up Storyblok space and creating the tokens (draft - published), the desired components and content.
Everything works fine, both locally as npm run dev
(development mode) and using npm run generate
(local production mode). I tested the second using the http-server
, it worked completely normally.
I tried :
1). Re-deploying without cache even.
2). Running locally npm run audit
and then npm run audit fix
to fix some vulnerabilities (to check if they were the problem by any chance).
3). Updated Nuxt to the newest version (it was 2.4.0 i think and I updated to 2.8.1.
4). I also tried commenting out the generation of the dynamic routes in the nuxt.config.js (so only the standard routes would be generated) to see if the dynamic routes are the problem but still similar error again.
The complete log in the Netlify Deployment is :
The expectation is to see all the routes being generated (normal ones and dynamic ones) and the crash happens I believe before any routes are being created (this happens later in the generation. Also I would like to say that the moment that the crash is being thrown isn't the same with each re deployment, it is in the similar spot and time but it has happened showing also something like this or (which is a bit farther) and also earlier but always after the client generation happens :
In contrast when I run npm run generate
locally all the requests towards Storyblok (using Axios) happen creating all the expected routes without any error or warning.
I didn't share the repository since it is a private repository and has tokens inside but if there are any informations that are needed please tell me so. If there is any idea to try in order to fix it please enlighten me and thank you for your time.
storyblok - 如何在自定义字段类型中获取选定的语言环境?
我正在尝试根据他们的指南在 Storyblok 中构建自定义字段类型/插件,并且至少需要被选中locale
或当前。slug
我在该插件的 Vuejs 实例中看不到此类信息。任何人都可以就它提出建议并提供一些代码如何做到这一点?
javascript - 错误:“[Vue 警告]:属性或方法“posts”未在实例上定义,但在渲染期间被引用。” 也适用于“书籍”
在此处输入图像描述我正在 Nuxt 和 vue 中使用 storyblok 作为我的 CMS 制作应用程序。但是,在尝试使用 v-for 将 storyblok 数组链接到我的模板中调用的数组时,我一直收到错误消息。
这是模板:
这是我的脚本:
当我尝试从 storyblok 调用两个 API 时,我更多地注意到了这个错误。当我调用一个 API 调用时,我没有看到这个错误。我也尝试过使用 Axios,但使用该方法也遇到了错误。我不是最有经验的开发人员,如果有人可以提供帮助,我将不胜感激。谢谢
reactjs - CMS 内容更改时重新构建生产 Next JS 网站
我们正在构建一个新的 Next JS 网站,并希望将其连接到无头 CMS。
目前更改内容意味着更改代码,运行下一个构建(主要生成静态文件)然后上传到 Azure,大约需要 10 分钟。
我们希望客户能够在 CMS 中编辑内容,例如 Storyblok(当内容发生变化时可以调用 webhook)或可能的无头 wordpress,以及在生产中创建新的静态文件的生产版本。
这甚至可能吗?
api - 我对为什么我的 DOM 没有显示来自 storyblok 的 API 调用结果没有足够的了解
我正在使用 storyblok 作为我的 CMS 在 Nuxt 中制作应用程序。但是,在尝试使用 v-for 将 storyblok 数组链接到我的模板中调用的数组时,我收到了错误。我从另一个用户那里得到了一些帮助并修复了错误,但是现在我没有足够的知识来了解为什么 DOM 没有在模板中调用的 v-for 上显示我的 API 调用的结果(“books ”和“帖子”)
这是模板:
这是我的脚本:
我不是最有经验的开发人员,如果有人可以提供帮助,我将不胜感激。谢谢
vue.js - 我可以从 vuex 调用 storyapi 吗?
我正在使用storyblok-nuxt模块。我将它插入,nuxt.cofig.js
当我直接在 asyncData 方法中调用它时,它在页面中运行良好,如下所示:
为了从 vuex 调用它,我正在导入它:
但是 Nuxt 给了我一个错误:
我可以在 vuex 中使用这个模块吗?如果可以,有什么解决方案?
vue.js - 迭代 Storyblok 中富文本组件中的标题
我正在使用storyblok-nuxt
模块。我有一个带有富文本的故事块组件。我想创建一个侧边栏,其中包含出现在此富文本中的标题列表,用于导航目的。有没有办法使用storyapi从富文本中提取这些标题,还是我需要手动完成?