Squarespace
to embed swift charts in a Squarespace page, just add the URL to the published viz in the alt
tag of an image.
- it can be fiddle to get it to save. After pasting the URL, click in the page margins (not inside a text block).
- make a small text change and revert it to enable saving

- if you want a wider chart, then change the design to poster (and remove the text overlaying it)

Ghost (deprecated)
Ghost post scripts to allow embedding charts
- in Page Properties → Code Injections, set the following:
<script type="module">
import {swiftEmbed} from '<https://embed.swiftcentre.org/swift-embed.es.js>'
swiftEmbed()
</script>
Embedding a chart
- Take a screenshot of the viz as per normal. This is what will be shown in newsletters (email doesn’t support dynamic display of charts).
- Click the ⚙️to get options about which parts of the results to display

- copy the url, switch to ghost and click
alt
underneath the image, then paste the url
Embedding charts - old