In this tutorial you will learn how to edit a site template and include an external library.
Click on Channels.
Click on Sites and select your Site.
Click on Templates.
Click on + Add layout.
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>
Click Save.
Click Preview.
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.
🏠 Learning Path: Create Microfrontends with the Widget Builder