Add SVGs + Google Icons to Squarespace website


How to Add AN SVG Icon to Page

 

Step 1 — Upload the SVG file using the block editor

  1. Go into any basic Text block

  2. Click on the Link button

  3. Click on the Gear button

  4. Select the “File” option

  5. Then “Upload File” with the SVG

  6. Click on the file uploaded so there’s a Check Mark to the left of the file name

  7. Click “Save

  8. Highlight and copy the uploaded file’s short link and place it into the embed code example

    • It will appear as: “ /s/dryp-dryp.svg

this is the link it will be used across the site when using this SVG

TIP: Save this url link to a brand manual, notes app, or organization folders for easy access and reference

 

Step 2 — Embed Your SVG Into a Page

  1. In the block editor, add a “Code” block

  2. Copy + Paste the code below

    <img src="/s/dryp-dryp.svg" height="100" alt="dryp dryp icon"></img>
  3. Replace: [ /s/dryp-dryp.svg ] with the SVG file link that was copied when uploaded

  4. Replace: [ dryp dryp icon ] with text describing your icon

  5. Adjust the height to a preferable size for desktop & mobile

  6. Make sure to keep the quotes as they appear in the example code above

 

To center align the embedded icon:

<div style="text-align:center;">
<img src="/s/dryp-dryp.svg" height="100" alt="dryp dryp icon"></img>
</div>

dryp dryp icon

To right align the embedded icon:

<div style="text-align:right;">
<img src="/s/dryp-dryp.svg" height="100" alt="dryp dryp icon"></img>
</div>

dryp dryp icon

How to add Google Icons

 

Step 1 — Inject Code Into Page Header

Copy + paste to install the following code in your page header (Settings > Advanced > Code Injection)

<link href="https://fonts.googleapis.com/icon?family=Material+Icons"      rel="stylesheet">

Step 2 — Choose Method to Embed/Reference Icon

Choose how to use the icon on your website (there are three options to reference/embed it)

  • Add a Code Block and reference by name

  • Add a Code Block and assign it to an h4

  • Assign it to h5 and use a Markdown Block to reference the icon

Utilizing custom CSS allows us to change the size, color, and any other text property

 

Add A Code Block

 

To use an icon in a code block when editing pages, you will need to copy the code below and reference the icon name (Google Icons)

Place the name of the icon inside the class like this example for the water_drop:

<span class="material-icons">
water_drop
</span>

water_drop
 

Assign to a heading using markdown blocks

 

Create and assign a Font Family (h5) Using a Markdown Block — You can assign the icon font family to a specific text type / font family. (Ex. we are using h5) Make sure you assign the font family to Material Icons by adding the code below to your site’s custom CSS), and adjust the other properties and values in bold. (view below)

 

Step 1 — Inject the code below into your site’s custom CSS to assign to h5

Navigate to the Custom CSS settings

 

Copy + Paste this Code to Custom CSS

h5 {font-family:Material Icons}

Customize the Icons — Adjust size and color by adding the section in bold

h5 {font-family:Material Icons; font-size: 4rem; color: blue}

 

View list of CSS Color Names here // View list of hex codes here

 

Step 2 — Reference Font Family by adding a Markdown Block

When in page editing mode, add a markdown block and type “ ##### (name of icon to reference)

##### water_drop

 

Markdown > ##### (name of icon)

the five pound “#” symbols is code for H5


Assign to an Existing Font Family

 

Repeat the same steps as we did above but use h4 instead of h5.

Add the following code to the Custom CSS

h4 {font-family: Material-Icons}

Adjust size and color by adding the section in bold

h4 {font-family:Material Icons; font-size: 4rem; color: blue}

 
 
 
Previous
Previous

How to Apply Oil Paint Effect in Photoshop

Next
Next

Tools + Resources for Digital Designers