A test Squarespace setup.
-
Set up a Squarespace site and enable developer mode: http://developers.squarespace.com/initial-setup/
-
Clone the Squarespace template:
https://your-site.squarespace.com/template.git
-
Create an empty repo in Github for the project.
-
Rename the Squarespace git remote to live:
git remote rename origin live
- Add a remote for the Github repo:
git remote add origin https://github.com/Yoomee/your-repo.git
- Verify you have the live and origin remotes set up correctly:
git remote -v
- Push the template to the Github repo
git push -u origin master
- Install and configure Node Squarespace server, https://github.com/NodeSquarespace/node-squarespace-server
npm install -g node-squarespace-server
Add the server settings to template.conf
"server": {
"siteurl": "https://your-site.squarespace.com",
// If you are in trial mode with your site
"sandbox": true,
// If you don't need full collection json data in navigation templates
"fulldata": false
}
Add .sqs-cache to your .gitignore
- Install Node Squarespace server, https://github.com/NodeSquarespace/node-squarespace-server
npm install -g node-squarespace-server
-
Clone the repo
git clone https://github.com/Yoomee/your-repo.git
-
Set up a remote for live
git remote add live https://your-site.squarespace.com/template.git
```
## Running the site locally
You can run the site locally, using the data from the live Squarespace site with your local version of the template.
Run the Node Squarespace server:
sqs server
You can then access the site on http://localhost:5050/. See https://github.com/NodeSquarespace/node-squarespace-server for other options.
You will be asked for the Squarespace username and password the first time you visit the local site.
## Workflow
Develop your feature on a feature branch.
PR into develop when complete.
When ready to release to live, merge develop into master and push master to live:
git push live master
You will be asked for the Squarespace username and password the first time you push to live.
## Using Sass instead of Less
This project uses Grunt to generate CSS from Sass instead of using Squarespace's built in LESS compiler.
To install the dependencies run:
npm install
Make your changes to the .scss files in /sass
To generate the CSS from Sass:
grunt build
To watch for changes and re-generate the CSS as you develop:
grunt watch
## Useful stuff
Reset the local server cache with
sqs buster