   {%- if page.title == nil -%} {%- comment -%} # This is a very hacky way to
   extract the page title from pages that do not have # front-matter yaml,
   but have a H1 header. We need to take (id-) attributes into # account, so
   some hacking is needed. Taking the following example: #

                              Docker run reference

   # # a. split on '

                              Docker run reference

   '] # b. split the last element on '

                            Docker run reference', '

   '] # c. split the first element on '>', which gives us ['

', 'Docker run reference'] {%- endcomment -%} {%- assign a = content | split: '

   ' | last -%} {%- assign page_title = c | strip_html | strip |
   truncatewords: 10 | escape_once -%} {%- endif -%} {%- if page.description
   == nil and page.datafile != nil and page.datafile != '' -%} {%- assign
   yaml_data = site.data[page.datafolder][page.datafile] -%} {%- if
   yaml_data.long and yaml_data.long != '' -%} {%- assign page_description =
   page.title | append: ': ' | append: yaml_data.long | strip_html | strip |
   truncatewords: 30 -%} {%- elsif yaml_data.short and yaml_data.short != ''
   -%} {%- assign page_description = page.title | append: ': ' | append:
   yaml_data.short | strip_html | strip | truncatewords: 30 -%} {%- else -%}
   {%- assign page_description = content | strip_html | strip |
   truncatewords: 30 -%} {%- endif -%} {%- endif -%} {%- assign domain_name =
   'https://docs.docker.com' -%} {%- if jekyll.environment == 'development'
   -%} {%- assign domain_name = 'https://localhost:4000' -%} {%- endif -%}
   {%- if page.sitemap == false or site.GH_ENV == "gh_pages" %} {%- endif %}
   {%- if jekyll.environment == 'production' and site.google_analytics != ''
   -%}{%- include analytics/google_analytics.html
   GOOGLE_ID=site.google_analytics -%}{%- endif -%}
   Link: canonical
   {%- comment -%} We put these scripts in the head section, but use "defer"
   loading to allow the browser to start loading them as soon as possible.
   Actual execution of deferred scripts happens once the HTML is fully
   parsed. see
   https://flaviocopes.com/javascript-async-defer/#with-defer-in-the-head {%-
   endcomment -%} {%- if page.layout == 'landing' -%} {%- else -%} {%- endif
   -%} {%- if site.local_search -%} {%- endif -%} {%- comment -%} preload
   fonts: https://www.freecodecamp.org/news/web-fonts-in-2018-f191a48367e8/
   we only preload the "woff2" variants, as older formats (woff, eot) are
   only used by older browsers, and we don't optimize for those. {%-
   endcomment -%}
