quitsocialmedia.club/_includes/backlinks.html

91 lines
4.2 KiB
HTML

<div class="box" id="backlinks">
<h2>Backlinks</h2>
<p class="center">
{% if page.lang == 'it' %}
Le pagine del sito che contengono un link a questa pagina.<br />
Curioso riguardo cosa voglia dire? Leggi <a href="https://www.wikiwand.com/it/Backlink" rel="noopener noreferrer" target="_blank">questo articolo</a>.
{% else %}
All the pages of this website containing a link to the current page.<br />Curious about what this means? Check <a href="https://www.wikiwand.com/en/Backlink" rel="noopener noreferrer" target="_blank">this article</a>.
{% endif %}
</p>
<ul>
{% comment %}+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ +
+ 100% Liquid backlinks parser based on pages permalinks. +
+ +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++{% endcomment %}
{% capture current_url %}{{ page.url }}{% endcapture %}
{% capture current_url_downcase %}{{ page.url | downcase }}{% endcapture %}
{% for entry in site.pages %}
{% unless entry.url contains '.json' or entry.url contains '.csv' or entry.url contains '.css' or entry contains '.txt' %}
{% if entry.content contains page.url or entry.content contains current_url_downcase %}
<li>
<a href="{{ entry.url }}">{{ entry.title }}</a>
{% if entry.description %}
- {{ entry.description }}
{% else %}
- {{ entry.excerpt | strip_html | truncatewords: 30 }}
{% endif %}
</li>
{% endif %}
{% for redirect in page.redirect_from | split '/' %}
{% capture redirect_ %}/{{ redirect }}{% endcapture %}
{% if entry.content contains redirect_ %}
<li>
<a href="{{ entry.url }}">{{ entry.title }}</a>
{% if entry.description %}
- {{ entry.description }}
{% else %}
- {{ entry.excerpt | strip_html | truncatewords: 30 }}
{% endif %}
</li>
{% endif %}
{% endfor %}
{% endunless %}
{% endfor %}
{% for collection in site.collections %}
{% assign collection_name = collection.label %}
{% for entry in site.[collection_name] %}
{% if entry.content contains page.url or entry.content contains current_url_downcase %}
{% case collection_name %}
{% when 'jar' %}
<li>🍯 <a href="{{ entry.url }}">{{ entry.title }}</a> - {% if entry.description %}{{ entry.description }}{% else %}{{ entry.excerpt | strip_html | truncatewords: 30 }}{% endif %}</li>
{% when 'sconnesso' %}
<li>🎙️ <a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% when 'posts' %}
<li>📖 <a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% when 'filinge' %}
<li>💭 <a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% else %}
<li><a href="{{ entry.url }}">{{ entry.title }}</a> - {{ entry.excerpt | strip_html | truncatewords: 30 }}</li>
{% endcase %}
{% endif %}
{% for redirect in page.redirect_from | split '/' %}
{% capture redirect_ %}/{{ redirect }}{% endcapture %}
{% if entry.content contains redirect_ %}
{% case collection_name %}
{% when 'jar' %}
<li>🍯 <a href="{{ entry.url }}">{{ entry.title }}</a> - {% if entry.description %}{{ entry.description }}{% else %}{{ entry.excerpt | strip_html | truncatewords: 30 }}{% endif %}</li>
{% when 'sconnesso' %}
<li>🎙️ <a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% when 'posts' %}
<li>📖 <a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% when 'filinge' %}
<li>💭 <a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% else %}
<li><a href="{{ entry.url }}">{{ entry.title }}</a> - {{ entry.description }}</li>
{% endcase %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
</ul>
</div>