问题标签 [headless-cms]

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.

0 投票
1 回答
261 浏览

directus - Directus 8前端hello world在哪里添加文件?

我第一次检查 Directus 8,有一些简单的东西我没有得到,也没有在文档中看到它。我的目录设置是:

我的期望是 Directus 在 public/admin 中,我应该能够为我的前端应用程序执行我想要的 public/index.php 。但是,当我更改它时,/admin 不再给我登录表单。我只是想让一个 hello-world 前端运行,但我没有看到如何或任何关于如何做到这一点的文档。我敢肯定,我只是忽略了一些简单的事情,但它正在变成其中一件需要我花费数小时才能弄清楚的事情,这让我发疯了……

基本上,如果我将原始 index.php 保留在我的公共根目录中,我就有 Directus 工作,但是如果公共 index.php 总是重定向到 Directus 管理员,我该如何设置我的前端应用程序?

0 投票
1 回答
76 浏览

docker - 我需要多少个 docker 容器,我如何在它们之间分配代码?

我正在设计一个由 Google App Engine 托管的网络服务,该服务由三部分组成,一个客户端网站(或更多),一个我设计用于编辑和查看该网站内容的简单 CMS,最后是一个服务器组件在这两个服务和数据库之间进行通信。我是 docker 新手,目前正在研究如何准确地设置我的容器以及我的项目结构。

我希望它们中的每一个都是单独的服务,因此将它们放在不同的容器中。根据我的研究,似乎完全有可能将它们放在单独的容器中并仍然让它们通信,但这是最佳解决方案吗?还考虑到将来我可能想扩大规模,以便我的支持可以提供多个不同的前端,这些前端都由同一个 CMS 管理。

tldr:
我应该如何最好地使用 docker 构建我的 web 服务,以及假设我的后端提供多个由 CMS 管理的前端。

欢迎任何关于工具或设计模式的建议,让我的生活更轻松!

0 投票
1 回答
176 浏览

webhooks - 发布文档时从 Sanity 接收 webhook 或其他类型的 ping?

我有一个在 Sanity.io 中存储数据的后端,我想将 Sanity 配置为在发布文档时 ping 我的应用程序,以便我可以清除任何缓存的数据。这样我可以大大减少我的应用程序和 Sanity 之间的流量。可能的?

0 投票
1 回答
1976 浏览

node.js - How to customise the Admin panel in Keystone JS? (Or: how do the custom admin pages in Keystone JS demo-project/blog work?)

We are looking to use KeystoneJS in a large project and we want to be able to customise the Admin panel. There's a nice example of how to do it here, and I've been reviewing this PR to the project. Although the example looks as if it would work for us, I don't understand the logic behind it, that is, what we would need to implement to make it work, what the possibilities and constraints are.

Is it the case that when you use the Keystone NextJS app (which is good for us), if you add a folder /admin/pages the Keystone app will look there and use those custom admin pages instead of the regular ones? I'm assuming we have full access to the rest of the app, the controllers, the DB from these pages as well....

I also noticed that JedWatson notes in https://github.com/keystonejs/keystone/pull/1019 that

Note this lacks SSR support, and I didn't put as much effort into the examples, but it's otherwise (I think) identical in functionality.

Does it lack SSR support just for the admin part, or does adding custom admin pages somehow affect SSR support in the rest of the app? (SSR is the reason we're using next)

Thanks for any info.

0 投票
1 回答
1125 浏览

reactjs - 每次新帖子都需要重建吗?使用 gatsby 和 WordPress

我最近使用 WordPress 创建示例 gatsby 工作正常。当我在 WordPress 上添加新帖子或博客时,是否每次都需要重建到 gasby?

0 投票
0 回答
78 浏览

content-management-system - 寻找与自定义数据库集成的 CMS

我正在处理的项目有问题。

我有一个应用程序,它有自己的数据库,其中包含用户及其凭据。我想要一个无头 CMS 来管理一些博客以避免编写我自己的博客,但我似乎找不到没有自己独立用户系统的 CMS。

所以我的问题是我是否可以集成一个 CMS 以使其在我的数据库中看到我的用户?还是我应该自己做而忘记与第三方集成?

谢谢

0 投票
1 回答
78 浏览

javascript - Flamelink CMS 检索数据纯js

我已经设置了firebase和flamelink我如何从全局获取数据我尝试这个但它不起作用:

为什么 obj 的输出不同? 在此处输入图像描述

0 投票
2 回答
429 浏览

reactjs - 链接到首页 GatsbyJS 和 WP REST API 菜单

每次我尝试链接到我的 Gatsby 构建的首页时,它都会附带一个对象 slug,它会在我的菜单中创建错误的链接。我已将网站设置为在我的 WordPress 设置中使用静态首页,因此首页根本不应该有 slug。

目前我菜单中的首页链接是 testpage.local/frontpage 这是错误的,因为不应该有 slug。我尝试使用直接 url 而不是 object_slug 但链接是 testpage.local/testpage.local/

我还尝试创建 menuitem 是一个自定义链接,但由于它链接到“/”,它得到相同的 object_slug(首页)。

因此,我如何使用 object_slug 但告诉 WordPress 我的首页没有任何 slug?

我正在使用的查询:

这返回

创建菜单:

0 投票
1 回答
59 浏览

authorization - 如何实现 Contentful CMS 用户资源访问控制?

我正在使用属于不同“帐户”的不同用户建立一个网站,当使用 Contentful CMS 或类似的无头 CMS 服务来限制基于用户及其帐户的内容时,有没有办法?

例如,此文档只能由属于帐户 1234 的用户访问

谢谢你!

0 投票
1 回答
306 浏览

directus - Directus 8多对多不显示

我有一个标准的多对多表设计,其中“托管”和“月”通过“托管月”连接。在 Directus 8 界面中,我将其设置为:

在此处输入图像描述

我已经尝试了多种显示设置,使用表格名称并且没有点(Twig?)格式。 {{months.id}} - {{months.month}}但是,{{id}} - {{month}} 无论我尝试什么,在集合视图中编辑记录时,它都会显示未选择任何项目(如果表为空,我会期望),但添加新项和选择现有项都是空的。

在此处输入图像描述

在此处输入图像描述

最后,我只是希望能够在这里分配多个月份,例如一月、四月、七月等,这似乎就是它的设计目的。但是我无法分配任何值。是的,我的“托管”和“月”表都有数据。

数据库结构是:

tbl hosting
-id
-domain
-cycle_start (不存储数据,但似乎需要这作为directus中多对多字段的字段)

tbl 月
-id
-月

tbl hosting_months
-id
-month_id
-hosting_id