Sha256: b7500003ae6fbd9d7692be593b73db8ae6c34aeb45f1e61a964e024a414f307f
Contents?: true
Size: 1.71 KB
Versions: 27
Compression:
Stored size: 1.71 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.com # # Copyright (C) 2019 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one/j1_template_mde/blob/master/LICENSE # # ----------------------------------------------------------------------------- # 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 %} Variables ------------------------------------------------------------ {% endcomment %} {% comment %} Liquid procedures ------------------------------------------------------------ {% 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
27 entries across 27 versions & 1 rubygems