Squarespace 可以连接到外部 Json Rest-API...吗?

Can Squarespace connect to an external Json Rest-API...?

我是 Squarespace 的新手,我想知道它是否可以使用 JSON 与外部 Rest-API 交互?
例如,假设我有一个私人托管的数据库,我希望通过 Squarespace 显示其中的数据,并根据用户的权限限制某些页面。

以上是否可能,如果可以,您能给我举个例子吗?我似乎无法通过 google.

在上面找到任何内容

谢谢

来自Squarespace

Squarespace doesn’t support server-side code, including PHP, Ruby, Ruby on Rails, and SQL.

因此,连接到外部 API 的唯一方法(Squarespace's official 'extensions' 支持的除外)是使用“客户端”(在浏览器中)JavaScript。

因此,您使用的数据库解决方案必须能够安全地处理客户端连接(例如,Firebase can do that). To interface with it, you must add the JavaScript to your Squarespace site via code block or code injection. An example explanation of doing that can be found at

至于allowing/disallowing基于数据库返回数据的内容,可以做到,但只能在客户端。这意味着,虽然您可以使该站点显示为限制访问 and/or 让其他人无法根据数据库中的信息访问某些页面,因为它都是客户端,从技术上讲可以被某人规避如果他们熟悉网络开发、网络检查器等。因此,如果真正限制内容至关重要,那么这不是您想要做的事情。

Squarespace 确实有自己的 "Members Areas",可用于解决内容访问问题。但是,目前它非常有限,还有很多场景它没有解决。