Customised Squarespace Template
This page assumes you have programming knowledge about Squarespace development. Squarespace's developer quick start documentation can be found here.
Prerequisites
Create a Squarespace site with a template that can have access to developer mode.
Set up your Squarespace development environment.
To publish your site at a later date, you will need a Business or a Commerce plan in order to keep the custom code.
The following documentation assumes a simple site with one site.region
file.
Installing Widgets
Each widget comes with a Javascript and CSS file. To add a widget to your website, you will need to add its corresponding Javascript and CSS in the head
tag of your site.region
file.
Copy and paste the code below into the code snippet box.
The uri for the Javascript and CSS for each widget is as follows:
If you always want the latest version, use latest for the <WIDGET_VERSION>. However, due to the changing nature of the codebase, it is possible that the "newer" latest is no longer compatible with the "previous" latest used to develop the app. It is thus recommended that you use a specific version of a widget for consistent results.
You can find a list of widgets, versions and links here.
Using Widgets
For more detailed examples, see the Manifold templates repository.
Through HTML
Use widgets as you would through regular HTML by providing a div
the necessary data-
attributes of the widget you'd like to inject. Place these div
blocks in the *.block
files of your Squarespace template.
Through Squarespace's editor
You can include and display Manifold Gallery listings in a specific way in predefined Squarespace collections through the CMS.
To do so, you have to:
define your custom Manifold Gallery listing type;
add/modify the collection's configuration file to accept the new, custom type;
add/modify the collection's
.item
and/or.list
template(s) to display what you want to display by using the custom type's information.
This leverages Squarespace's custom post types.
1 - Define a custom Manifold Gallery listing type
In template.conf
, add the following type definition in the customTypes
array:
2 - Add/Modify the collection's configuration
Add manifoldGalleryListing
to the list of accepted types in the .conf
file of the collection you want to modify.
3 - Add/Modify the collection's template file(s)
In the .item
and/or the .list
template file(s), use the custom properties to display the custom post type the way you want.
Styling
Widgets are styled using standard CSS. As Less is supported by Squarespace, you can also write styles using Less.
Tweaks are also integrable with Manifold widget code as long as they are properly defined. You can find more about Squarespace tweaks here.
See the Manifold templates repository for examples on how to include custom Manifold widget styling.
Examples
Examples of commonly used features can be found here. Please feel free to use this as a starting point to building your own dApp.
Last updated