在 Squarespace 网页中嵌入功能性网站

Embedding a functional website inside a Squarespace webpage

首先,感谢您所做的一切。没有这个社区,我会讨厌网页设计并依赖我老师过时的静态方法。非常喜欢 <3

所以,这是一个棘手的问题(也许)。
从本质上讲,我想在包含我之前编码的网站的网页上拥有一个 iframe。这是一个从未上线的学校项目,但我想将它作为我投资组合的一部分。问题是,iframe 需要一个 URL 作为源,但我只有一个文件夹,其中包含更多充满代码、字体和图像的文件夹。我怎样才能告诉浏览器用 "name" 文件夹中的所有内容填充此框?然后它如何知道 运行 代码而不是仅仅显示文件树或其他东西?

最后,我想要一个描述以前网络项目的页面,让客户在一页内体验该项目。而且我不想为我所做的每个项目都获得一个域。 也许有更简单的方法我没有想到?

为了让它变得有趣,我的新投资组合网站正在 Squarespace 中制作...也许吧。我从他们那里买了一个域名,因为我有一个促销代码,想试用这个平台,但我有点讨厌它。我无法更改任何代码,也不会保持与 Typekit 的连接。所以我所能做的就是改变已有元素的基本外观。这就像 WordPress 又一次……蹩脚!可悲的是,我已经购买了域名。 Squarespace 可以只是一个主机吗?有没有办法下载这些模板的原始代码,编辑它,然后重新上传?

感谢您的帮助!

I want to have, essentially, an iframe on a webpage that contains a website I coded previously.

Squarespace's file upload mechanism is very limited. Without using the Developers Platform,一次上传很多文件没有有效的方法。此外,无法创建文件夹。因此,即使您愿意逐个上传每个 .html 文件和每个资产,也无法将文件组织到文件夹中(假设您提到的 "tree" 包括额外的子文件夹)。

最初,为了让 Squarespace 可以访问这些文件,您必须执行以下操作之一:

  1. 使用 Squarespace Developers Platform (A.K.A. "Developer Mode") 并上传您的待 iframed (TBI) 网站文件到 "assets" 文件夹使用 SFTP 或 Git.
  2. 在其他地方托管您的 TBI 网站文件(不同的主机 环境,例如),这将维护您的 file/folder 结构。

How can I tell the browser to populate this box with everything from "name" folder? And then how will it know to run the code instead of just showing a file tree or something?

假设 TBI 网站有一个 index.html 文件或 home.html 文件或类似文件,并且假设您要使用 Squarespace Developer Platform,您可以将 iframe 插入 Code Block or within a template/.region file 直接使用

<iframe src="/assets/tbiwebsitefolder/index.html"></iframe>

同时根据需要设置其他 iframe attributes(例如高度和宽度)。

Is there a way to download the raw code of these templates, edit it, and upload it again?

是的。您 select 一个模板,然后在该模板上启用开发人员模式。从那里,您可以使用 SFTP 或 Git 下载模板文件,编辑并重新上传。

您可能会受益于回顾一些 considerations of enabling Developer Mode on a Squarespace Template

为了完全避免 iframe 和开发人员模式,另一个想法是捕获在浏览器中呈现的 TBI 网站的图像,然后简单地将这些图像添加到 gallery block or gallery page。这可以让您传达项目的总体思路,但当然不会捕捉到完整的 "experience"。