View JSON Data

The JSON data returned to every page and block can be viewed and accessed via a URL or template formatter.

Website & Collection Data

To access the data behind any collection in a structured format, append this query string to any URL: ?format=json-pretty

In addition to returning collection data, other data needed to construct a full page (such as website data) will also be returned.

Example:

http://base-template.squarespace.com/blog/?format=json-pretty

Block & Navigation Data

Within a template file directly, use the JSON formatter to output JSON for any item you have in scope, just add this within the block file: {item|json-pretty}

Example from a navigation.block file:

<pre>{@|json-pretty}</pre>

You can also log the object in your browser's console.

<script>console.log({@|json-pretty})</script>

This is especially useful for debugging.