> For the complete documentation index, see [llms.txt](https://stack.sylius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stack.sylius.com/cookbook/admin_panel/metatags.md).

# Customizing the metatags

## Adding metatags

To add new `<head>` meta tags, you can use the `sylius_admin#metatags` hook. This is useful for adding a favicon or SEO meta tags, for example. You can register your own Twig template for meta tags via YAML or PHP.

{% tabs %}
{% tab title="YAML" %}
{% code title="config/packages/sylius\_bootstrap\_admin\_ui.yaml" lineNumbers="true" %}

```yaml
# ...
sylius_twig_hooks:
    hooks:
        # ...
        'sylius_admin.base#metatags':
            favicon:
                template: 'favicon.html.twig'
            seo_metatags:
                template: 'seo_metatags.html.twig'
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}
{% code title="config/packages/sylius\_bootstrap\_admin\_ui.php" lineNumbers="true" %}

```php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
    // ...

    // Define your own Twig template for the favicon.
    $containerConfigurator->extension('sylius_twig_hooks', [
        'hooks' => [
            'sylius_admin.base#metatags' => [
                'favicon' => [
                    'template' => 'favicon.html.twig',
                ],
                'seo_metatags' => [
                    'template' => 'seo_metatags.html.twig',
                ],
            ],
        ],

    ]);
};
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% code title="templates/favicon.html.twig" %}

```twig
<link rel="icon" type="image/x-icon" href="{{ asset('images/your_favicon.svg') }}" />
```

{% endcode %}

{% code title="templates/seo\_metatags.html.twig" %}

```twig
<meta name="description" content="Your custom description">
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://stack.sylius.com/cookbook/admin_panel/metatags.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
