jekyll

https://github.com/nntrn/save/issues/33

Created on Last updated on


Custom permalink using collections

include_relative

{% assign parent_path = page.path | split:'/' | last %}
{% assign parent_path = page.path | remove:  parent_path %}

{% for file in site.static_files %}
{% if file.path contains parent_path %}
{% assign file_name = file.path | remove:  parent_path | remove:  "/" %}

{% include_relative {{ file_name }} %}

{% endif %}
{% endfor %}

https://stackoverflow.com/a/61466077