Widget Integrations with external libraries
Carlos Solis avatar
Written by Carlos Solis
Updated over a week ago

In this tutorial you will learn how to edit a site template and include an external library.

Click on Channels.

Click on Channels.

Click on Sites and select your Site.

Click on Sites and select your Site.

Click on Templates.

Click on Templates.

Click on + Add layout.

Click on + Add layout.

Type "my_layout" and click Add.

Type "my_layout" and click Add.

Add your library to the head tag. For our example, we will add ChartJS using a script tag. Copy the following code:

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.2.1/chart.min.js" integrity="sha512-v3ygConQmvH0QehvQa6gSvTE2VdBZ6wkLOlmK7Mcy2mZ0ZF9saNbbk19QeaoTHdWIEiTlWmrwAL4hS8ElnGFbA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

Add your library to the head tag. For our example, we will add ChartJS using a script tag. Copy the following code:

Click Save.

Click Save.

Click Preview.

Click Preview.

To verify the library was uploaded successfully, open the browser's developer tools. Right-click the page and select Inspect.

To verify the library was uploaded successfully, open the browser's developer tools. Right-click the page and select Inspect.

In the developer tools, click Network, filter by JS files, and reload the page. You can now start using your library.

In the developer tools, click Network, filter by JS files, and reload the page. You can now start using your library.


Did this answer your question?