{%- 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 -%} {%- if site.google_analytics != '' -%}{%- include analytics/google_analytics.html GOOGLE_ID=site.google_analytics -%}{%- endif -%} {%- if page.hide_from_sitemap or site.GH_ENV == "gh_pages" %} {%- endif %} {{ page.title | default: page_title }} | Docker Documentation {%- 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. For fontawesome we "prefetch" to allow the browser to pre-heat the cache, but not load it if the page does not use it. {%- endcomment -%}