Welcome to the Finch Asset Management Guide! This guide will walk you through the steps to manage assets in your Finch application. Whether you're a seasoned developer or just starting, Finch offers a robust set of tools to simplify server-side web app development.
What are Assets?
Assets in Finch are files that are used in your application. These files can be JavaScript, CSS, images, or any other type of file. Assets are used to add functionality, style, and content to your application.
How to use Assets in Finch?
Finch provides a simple way to manage assets in your application. You can add assets to your application by using the addAsset method. Here is an example of how to use it:
You can also add multiple assets at once by using the addAssets method. Here is an example of how to use it:
Asset Types
Finch supports two types of assets: JavaScript and CSS. You can specify the type of the asset by using the type parameter. Here is an example of how to use it:
Asset in templates
You can also add assets to your templates by using the {{ assets.js() }} syntax. Here is an example of how to use it:
Result
The result of the above code will be a HTML page with the following content: