{% 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, 2024 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE # ----------------------------------------------------------------------------- # 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 %} {% assign title_separator = ' ยท ' %} {% comment %} initialize site variables -------------------------------------------------------------------------------- {% endcomment %} {% 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 %} {% if page.keywords %} {% assign keywords = page.keywords %} {% elsif site.keywords %} {% assign keywords = site.keywords %} {% endif %} {% if page.slogan %} {% assign slogan = page.slogan %} {% elsif site.slogan %} {% assign slogan = site.slogan %} {% endif %} {% if page.title %} {% assign title = page.title %} {% elsif site.title %} {% assign title = site.title %} {% endif %} {% if page.title_extention %} {% assign title_extention = page.title_extention %} {% elsif site.title_extention %} {% assign title_extention = site.title_extention %} {% endif %} {% capture full_title %} {{title}} {{title_separator}} {{title_extention}} {% endcapture %} {% if page.description %} {% assign description = page.description %} {% elsif site.description %} {% assign description = site.description %} {% endif %} {% capture full_description %} {{slogan}} {{description}} {% endcapture %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %}