# Assets

Assets allow you to upload your own CSS, Javascript, Images or Twig files to your template, which you can later reference in your files.

To create an asset, first upload it from within the template editor. Once you have uploaded the asset, you can retrieve the public URL of the asset by using the`asset()` function. This function will return the full URL of the asset hosted on our global CDN.

For example, you could upload `scripts.js` as an asset, and then include it in your template:

```twig
<script defer src="{{ asset('scripts.js') }}"></script>
```

You're also able to create TWIG files that you can later reference in your template. For example, you could create an asset called `navigation.twig`, and then include it using the Twig include tag:

```twig
{% include "navigation.twig" %}
```

This allows you to create code that is easily reusable across multiple locations in your template.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tebex.io/developers/templates/assets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
