我可以在 Squarespace 中存储数据库信息吗

Can I store database information in Squarespace

我正在考虑从 Wordpress 迁移到 Squarespace,但我已经为 wordpress 编写了一个自定义插件,可以定期更新新闻提要。我查看了 Squarespace 文档,它似乎相当严格。有什么方法可以在 Squarespace 和 运行 一个 cron 作业中存储数据库信息?

不,you can only add "client-side code" 到 Squarespace 站点,而不是“server-side 代码”。

You can't add server-side code

Server-side code is handled by a server, not by a browser, and includes: PHP, Ruby, Ruby on Rails, SQL

因此,您必须为 运行 您的 cron 作业、单独的服务器等找到一些其他服务。Squarespace 开发人员使用的几个解决方案。还需要数据库功能的是 Firebase,或 Google Sheets + Apps Script。例如,您会看到许多 Squarespace 用户将他们的数据发送到 Google Sheets,然后使用 Zapier and/or Apps Script 来操作数据并触发其他服务。当然,端点需要通过 Javascript/AJAX 访问才能在您的网站上显示数据。