{% comment %}
# -----------------------------------------------------------------------------
# ~/_includes/themes/j1/layouts/meta_data_generator.html
# Liquid template to generate all meta data for all pages
#
# Product/Info:
# https://jekyll.one
#
# Copyright (C) 2023 Juergen Adams
#
# J1 Theme is licensed under the MIT License.
# See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md
# -----------------------------------------------------------------------------
# Test data:
# liquid_var: {{ liquid_var | debug }}
# -----------------------------------------------------------------------------
{% endcomment %}
{% comment %} Liquid procedures
-------------------------------------------------------------------------------- {% endcomment %}
{% comment %} Process YML config data
================================================================================ {% endcomment %}
{% comment %} Set config files
-------------------------------------------------------------------------------- {% endcomment %}
{% assign template_config = site.data.j1_config %}
{% assign blocks = site.data.blocks %}
{% assign modules = site.data.modules %}
{% assign plugins = site.data.plugins %}
{% comment %} Set config data
-------------------------------------------------------------------------------- {% endcomment %}
{% assign seo_tag_defaults = plugins.defaults.seo-tags.defaults %}
{% assign seo_tag_settings = plugins.seo-tags.settings %}
{% comment %} Set config options
-------------------------------------------------------------------------------- {% endcomment %}
{% assign seo_tag_options = seo_tag_defaults | merge: seo_tag_settings %}
{% comment %} initialize global variables
-------------------------------------------------------------------------------- {% endcomment %}
{% assign environment = site.environment %}
{% assign template_version = site.version %}
{% case site.environment %}
{% when 'production' %}
{% assign ext_css = 'min.css' %}
{% assign ext_js = 'min.js' %}
{% when 'prod' %}
{% assign ext_css = 'min.css' %}
{% assign ext_js = 'min.js' %}
{% else %}
{% assign ext_css = 'css' %}
{% assign ext_js = 'js' %}
{% endcase %}
{% comment %} Main
-------------------------------------------------------------------------------- {% endcomment %}
{% if template_config.translation.enabled %}
{% endif %}
{% if template_config.translation.google %}
{% endif %}
{% if site.favicon.image %}
{% endif %}
{% comment %} Check robot settings from site configuration
-------------------------------------------------------------------------------- {% endcomment %}
{% if site.robots.index and site.robots.index <> nil %}
{% capture robots_index %}{% endcapture %}
{% else %}
{% capture robots_index %}{% endcapture %}
{% endif %}
{% if site.robots.follow and site.robots.follow <> nil %}
{% capture robots_follow %}{% endcapture %}
{% else %}
{% capture robots_follow %}{% endcapture %}
{% endif %}
{% comment %} page.robots.index: {{ page.robots.index | debug }} {% endcomment %}
{% comment %} Check robot settings from page (or default SCOPE)
-------------------------------------------------------------------------------- {% endcomment %}
{% if page.robots.index %}
{% capture robots_index %}{% endcapture %}
{% endif %}
{% if page.robots.index == false %}
{% capture robots_index %}{% endcapture %}
{% endif %}
{% if page.robots.follow %}
{% capture robots_follow %}{% endcapture %}
{% endif %}
{% if page.robots.follow == false %}
{% capture robots_follow %}{% endcapture %}
{% endif %}
{{robots_index}}
{{robots_follow}}
{% if page.analytics and site.data.j1_config.analytics.enabled %}
{% capture analytics %}{% endcapture %}
{% else %}
{% capture analytics %}{% endcapture %}
{% endif %}
{{analytics}}
{% if page.comments and site.data.j1_config.comments.enabled %}
{% capture comments %}{% endcapture %}
{% else %}
{% capture comments %}{% endcapture %}
{% endif %}
{{comments}}
{% if page.advertising and site.data.j1_config.advertising.enabled %}
{% capture advertising %}{% endcapture %}
{% else %}
{% capture advertising %}{% endcapture %}
{% endif %}
{{advertising}}
{% if page.translation and site.data.j1_config.translation.enabled %}
{% capture translation %}{% endcapture %}
{% else %}
{% capture translation %}{% endcapture %}
{% endif %}
{{translation}}
{% if page.youtube %}
{% capture youtube %}{% endcapture %}
{% else %}
{% capture youtube %}{% endcapture %}
{% endif %}
{{youtube}}
{% if page.vimeo %}
{% capture vimeo %}{% endcapture %}
{% else %}
{% capture vimeo %}{% endcapture %}
{% endif %}
{{vimeo}}
{% if page.personalization %}
{% capture personalization %}{% endcapture %}
{% else %}
{% capture personalization %}{% endcapture %}
{% endif %}
{{personalization}}
{% comment %} Load additional fonts from remote
-------------------------------------------------------------------------------- {% endcomment %}
{% comment %} J1 SEO processing
-------------------------------------------------------------------------------- {% endcomment %}
{% comment %} PRELOAD fonts
-------------------------------------------------------------------------------- {% endcomment %}
{% if template_config.preload.font.preload %}
{% assign cors = template_config.preload.font.cors %}
{% assign fonts = template_config.preload.font.fonts %}
{% for font in fonts %}
{% endfor %}
{% else %}
{% endif %}
{% comment %} PRELOAD CSS files
-------------------------------------------------------------------------------- {% endcomment %}
{% if template_config.preload.css.preload %}
{% assign css = template_config.preload.css.css %}
{% assign files = template_config.preload.css.files %}
{% for file in css %}
{% endfor %}
{% for file in files %}
{% endfor %}
{% else %}
{% endif %}
{% comment %} PRELOAD JS files
-------------------------------------------------------------------------------- {% endcomment %}
{% if template_config.preload.js.preload %}
{% assign js = template_config.preload.js.js %}
{% assign files = template_config.preload.js.files %}
{% for file in js %}
{% endfor %}
{% for file in files %}
{% endfor %}
{% else %}
{% endif %}
{% comment %} PRELOAD image files
-------------------------------------------------------------------------------- {% endcomment %}
{% if template_config.preload.image.preload %}
{% assign files = template_config.preload.image.files %}
{% for file in files %}
{% endfor %}
{% else %}
{% endif %}
{% comment %} Request PRECONNECT of 3rd party origins (SEO)
-------------------------------------------------------------------------------- {% endcomment %}
{% if template_config.preconnect.enabled %}
{% assign urls = template_config.preconnect.urls %}
{% for url in urls %}
{% endfor %}
{% else %}
{% endif %}
{% comment %} SEO Tag processing
-------------------------------------------------------------------------------- {% endcomment %}
{% if seo_tag_options.enabled %}
{% seo %}
{% else %}
{% endif %}