vendor/shopware/platform/src/Storefront/Resources/views/storefront/layout/meta.html.twig line 1

Open in your IDE?
  1. {% block layout_head_inner %}
  2.     {% set metaInformation = page.metaInformation %}
  3.     {% set basicConfig = config('core.basicInformation') %}
  4.     {% set maxLength = config('seo.descriptionMaxLength') %}
  5.     {% set metaDescription = metaInformation.metaDescription|striptags|trim|u.truncate(maxLength ?? 160, '…') %}
  6.     {% set metaTitle = metaInformation.metaTitle|striptags|trim %}
  7.     {% set metaKeywords = metaInformation.metaKeywords|striptags|trim %}
  8.     <head>
  9.         {% block layout_head_meta_tags %}
  10.             {% block layout_head_meta_tags_charset %}
  11.                 <meta charset="utf-8">
  12.             {% endblock %}
  13.             {% block layout_head_meta_tags_viewport %}
  14.                 <meta name="viewport"
  15.                       content="width=device-width, initial-scale=1, shrink-to-fit=no">
  16.             {% endblock %}
  17.             {% block layout_head_meta_tags_general %}
  18.                 <meta name="author"
  19.                       content="{% block layout_head_meta_tags_general_author %}{{ metaInformation.author|striptags }}{% endblock %}"/>
  20.                 <meta name="robots"
  21.                       content="{% block layout_head_meta_tags_robots %}{{ metaInformation.robots }}{% endblock %}"/>
  22.                 <meta name="revisit-after"
  23.                       content="{% block layout_head_meta_tags_general_revisit %}{{ metaInformation.revisit|striptags }}{% endblock %}"/>
  24.                 <meta name="keywords"
  25.                       content="{% block layout_head_meta_tags_keywords %}{{ metaKeywords }}{% endblock %}"/>
  26.                 <meta name="description"
  27.                       content="{% block layout_head_meta_tags_description %}{{ metaDescription }}{% endblock %}"/>
  28.             {% endblock %}
  29.             {% block layout_head_meta_tags_opengraph %}
  30.                 <meta property="og:type"
  31.                       content="{% block layout_head_meta_tags_type_og %}website{% endblock %}"/>
  32.                 <meta property="og:site_name"
  33.                       content="{% block layout_head_meta_tags_sitename_og %}{{ basicConfig.shopName }}{% endblock %}"/>
  34.                 <meta property="og:title"
  35.                       content="{% block layout_head_meta_tags_title_og %}{{ metaTitle }}{% endblock %}"/>
  36.                 <meta property="og:description"
  37.                       content="{% block layout_head_meta_tags_description_og %}{{ metaDescription }}{% endblock %}"/>
  38.                 <meta property="og:image"
  39.                       content="{% block layout_head_meta_tags_image_og %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  40.                 <meta name="twitter:card"
  41.                       content="{% block layout_head_meta_tags_card_twitter %}summary{% endblock %}"/>
  42.                 <meta name="twitter:site"
  43.                       content="{% block layout_head_meta_tags_sitename_twitter %}{{ basicConfig.shopName }}{% endblock %}"/>
  44.                 <meta name="twitter:title"
  45.                       content="{% block layout_head_meta_tags_title_twitter %}{{ metaTitle }}{% endblock %}"/>
  46.                 <meta name="twitter:description"
  47.                       content="{% block layout_head_meta_tags_description_twitter %}{{ metaDescription }}{% endblock %}"/>
  48.                 <meta name="twitter:image"
  49.                       content="{% block layout_head_meta_tags_image_twitter %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  50.             {% endblock %}
  51.             {% block layout_head_meta_tags_schema_webpage %}
  52.                 <meta itemprop="copyrightHolder"
  53.                       content="{% block layout_head_meta_tags_copyright_holder %}{{ basicConfig.shopName }}{% endblock %}"/>
  54.                 <meta itemprop="copyrightYear"
  55.                       content="{% block layout_head_meta_tags_copyright_year %}{{ metaInformation.copyrightYear|striptags }}{% endblock %}"/>
  56.                 <meta itemprop="isFamilyFriendly"
  57.                       content="{% block layout_head_meta_tags_family_friendly %}{% if basicConfig.familyFriendly %}true{% else %}false{% endif %}{% endblock %}"/>
  58.                 <meta itemprop="image"
  59.                       content="{% block layout_head_meta_tags_image_meta %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  60.             {% endblock %}
  61.             {% block layout_head_meta_tags_hreflangs %}
  62.                 {% for link in hrefLang %}
  63.                     <link rel="alternate" hreflang="{{ link.locale }}" href="{{ link.url }}" />
  64.                 {% endfor %}
  65.             {% endblock %}
  66.         {% endblock %}
  67.         {% block layout_head_favicon %}
  68.             <link rel="shortcut icon"
  69.                   href="{{ theme_config('sw-logo-favicon') }}">
  70.         {% endblock %}
  71.         {% block layout_head_apple %}
  72.             <link rel="apple-touch-icon"
  73.                   sizes="180x180"
  74.                   href="{{ theme_config('sw-logo-share') }}">
  75.         {% endblock %}
  76.         {% block layout_head_android %}
  77.             <link rel="icon"
  78.                   sizes="192x192"
  79.                   href="{{ theme_config('sw-logo-share') }}">
  80.             <meta name="theme-color"
  81.                   content="{{ theme_config('sw-color-brand-primary') }}"/>
  82.         {% endblock %}
  83.         {% block layout_head_canonical %}
  84.             {% if page.metaInformation.canonical %}
  85.                 <link rel="canonical" href="{{ page.metaInformation.canonical }}" />
  86.             {% endif %}
  87.         {% endblock %}
  88.         {% block layout_head_title %}
  89.             <title itemprop="name">
  90.                 {% block layout_head_title_inner %}{% apply spaceless %}
  91.                     {{ metaTitle }}
  92.                 {% endapply %}{% endblock %}
  93.             </title>
  94.         {% endblock %}
  95.         {% block layout_head_stylesheet %}
  96.             {% if isHMRMode %}
  97.                 {# CSS will be loaded from the JS automatically #}
  98.             {% else %}
  99.                 {% set assets = theme_config('assets.css') %}
  100.                 {% for file in assets %}
  101.                     <link rel="stylesheet"
  102.                       href="{{ asset(file, 'theme') }}">
  103.                 {% endfor %}
  104.             {% endif %}
  105.         {% endblock %}
  106.         {% block layout_head_javascript_feature %}
  107.             {% sw_include "@Storefront/storefront/component/feature.html.twig" %}
  108.         {% endblock %}
  109.         {# Block for tracking scripts which are required to include in the `head` section of the document #}
  110.         {% block layout_head_javascript_tracking %}
  111.             {% sw_include "@Storefront/storefront/component/analytics.html.twig" %}
  112.         {% endblock %}
  113.     </head>
  114. {% endblock %}