Sha256: a716a294fe8d9fc7a924059e266759bfd76744124dfd6ad2e08a504d687a094b
Contents?: true
Size: 1.74 KB
Versions: 12
Compression:
Stored size: 1.74 KB
Contents
{% comment %} # ----------------------------------------------------------------------------- # ~/_includes/themes/j1/procedures/global/get_page_url.proc # Liquid PROCEDURE to calculate the URL of a page (page_url) # # 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.md # ----------------------------------------------------------------------------- # Global procedure. Calculates the absolute path of the current page # relative to the web root. The path is resturned by the liquid variable # page_url. # # Usage: # # 1) include the get_page_url.proc procedure # 2) assign|use the page_url variable # # Example: # # {% capture get_page_url %}themes/{{site.template.name}}/procedures/global/get_page_url.proc{% endcapture %} # # {% include {{get_page_url}} %} # {% assign my_page_url = page_url %} # # ----------------------------------------------------------------------------- # Test data: # liquid_var: {{ liquid_var | debug }} # # ----------------------------------------------------------------------------- {% endcomment %} {% comment %} Liquid procedures -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Variables -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %} {% if site.permalink == 'none' %} {% capture page_url %}{{ page.url }}.html{% endcapture %} {% else %} {% capture page_url %}{{ page.url }}{% endcapture %} {% endif %}
Version data entries
12 entries across 12 versions & 1 rubygems