2

I am looking to host an entire Squarespace website locally, including all associated files. I have been diligently wgeting all the associated files and replacing the path with local paths. However I hit a snag in the following file:

//- this loads but it's from squarespace, so we can't use this unless we have an active account
//- script(src='../squarespace/scripts/common-82d600baf3cebf62de6b.js')

script(crossorigin='anonymous', src='//static.squarespace.com/universal/scripts-compressed/common-82d600baf3cebf62de6b-min.en-US.js')

Note the commented out section is where I wish to refer to a local version of the .js script. The full script, un-minified, is in the link below: https://raw.githubusercontent.com/lingxiao/Homepage/master/public/squarespace/scripts/common-82d600baf3cebf62de6b.js.

The problem is that part of the website still loads as intended, but a lot of the effect is gone and consequentially the content is no longer viewable. For example, the original site is here: https://lingxiaoling.me/tech, and when I use the local hosted file, when I scroll down, the TECH ... I interrogate ... page remains static.

However when I use the squarespace hosted file, the page scrolls down as intended.

I tried examining the common-####.de6bjs file and nothing in it jumps out at me. Is the notion of ripping an entire Square space webpage locally and modifying it insane?

xiaolingxiao
  • 4,793
  • 5
  • 41
  • 88
  • you know that you're infringing the copyright of squarespace by doing that, right? you might own the content of your website, but they own the markup, scripts, stylesheets, etc. – Dominik Dorn Apr 14 '18 at 19:50
  • this is just an exercise. – xiaolingxiao Apr 14 '18 at 19:53
  • Look for `squarespace.com` in the code, it might be loading furthermore scripts. – Brahma Dev Apr 14 '18 at 21:01
  • @BrahmaDev hm so when I looked for squarespace.com in the code, and I navigate to one of the links: "https://static.squarespace.com/universal/scripts-compressed/", I get a blank page with nothing on it. Does that mean there is no script there or I just can't acess it? – xiaolingxiao Apr 14 '18 at 22:14

1 Answers1

2

Assuming you're just doing this as an exercise:

Open the sqarespace site you want to download, e.g. https://www.missionchinesefood.com/

Choose in Firefox (I'm on Mac OSX, might look different in other OSes):

  1. File
  2. Save Page as
  3. Choose type "Webpage Complete".

Firefox will now download all JS, CSS, Images, HTML etc. to the place you defined.

  1. Open the page from there,
  2. open the Developer Tools,
  3. switch to the networking tab,
  4. reload and see which resources are still referenced from the internet.
  5. Download those manually and adjust the downloaded scripts/html files.
Dominik Dorn
  • 1,820
  • 12
  • 18