{% if site.settings.project.license_file %}
{% capture license_file %}{{ '/' | relative_url }}{{ site.settings.project.license_file }}{% endcapture %}
{% else %}
{% for file in site.static_files %}
{% assign path = file.path | downcase %}
{% if path == '/license' or path == '/license.txt' %}
{% assign license_file = file.path | relative_url %}
{% endif %}
{% endfor %}
{% endif %}
{% if site.settings.project.license %}
{% assign license = site.settings.project.license %}
{% unless license_file %}
{% capture license_file %}https://spdx.org/licenses/{{ license }}.html{% endcapture %}
{% capture license %}{{ license }} License{% endcapture %}
{% endunless %}
{% elsif site.github.license %}
{% assign license = site.github.license.name %}
{% unless license_file %}
{% capture license_file %}https://spdx.org/licenses/{{ site.github.license.spdx_id }}.html{% endcapture %}
{% endunless %}
{% endif %}
{% if license %}
{% capture license_text %}
{{ license }}{% endcapture %}
{% elsif license_file %}
{% capture license_text %}License:
view{% endcapture %}
{% endif %}
{% capture timestamp_text %}Build: {{ site.time | date: '%F' }}{% endcapture %}
{% capture theme_text %}
jekyll-theme{% endcapture %}
{% assign footer_items = '' | split: '' %}
{% if license_text %}
{% assign footer_items = footer_items | push: license_text %}
{% endif %}
{% assign footer_items = footer_items | push: timestamp_text %}
{% assign footer_items = footer_items | push: theme_text %}
{% capture sep %}{% endcapture %}