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