Skip to content

Instantly share code, notes, and snippets.

@vikramsoni2
Last active April 22, 2023 01:05
Show Gist options
  • Save vikramsoni2/978b2209f87c185d25d07fbba5195553 to your computer and use it in GitHub Desktop.
Save vikramsoni2/978b2209f87c185d25d07fbba5195553 to your computer and use it in GitHub Desktop.
Add CSV data into SS from google drive

Link data stored in your Google Drive as CSV file into Squarespace.

You need to add the script provide in this gist to your Squarespace site using Code-injectin option and add the cde to the footer section.

Configurable options : IMPORTANT

targetNode:

This is a list element ( <ul> element in HTML) that you need to populate

googleDriveLink:

Add your file to google drive, and then use "get Link" option to generate link. Please make sure that its readable by anyone with access to link.

The below code shows an exmaple where its targetting a ul list and adding links to it dynamically from a csv where where we have two columns. Name and link. The name contains the display name of the item and the link column contains the url

name link
first https://google.com
second https://bing.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment