footer: use variable instead of absolute link for RSS feed

See merge request monero-project/monero-site!1180
This commit is contained in:
luigi1111 2020-02-06 03:43:07 +01:00
commit 459a89ddd0
2 changed files with 9 additions and 7 deletions

View file

@ -11,7 +11,7 @@
- name: Library - name: Library
url: library url: library
- name: RSS Feed - name: RSS Feed
url: https://getmonero.org/feed.xml url: rss
- title: IRC Channels - title: IRC Channels
subfolderitems: subfolderitems:
- name: monero - name: monero

View file

@ -8,11 +8,13 @@
{% for entry in item.subfolderitems %} {% for entry in item.subfolderitems %}
{% if entry.url contains 'https://' %} {% if entry.url contains 'https://' %}
<li><a class="white" href="{{ entry.url }}">{{ entry.name }}</a></li> <li><a class="white" href="{{ entry.url }}">{{ entry.name }}</a></li>
{%elsif entry.url contains 'irc'%} {% elsif entry.url contains 'irc' %}
<li><a class="white" href="{{ entry.url }}">{{ entry.name }}</a></li> <li><a class="white" href="{{ entry.url }}">{{ entry.name }}</a></li>
{%else%} {% elsif entry.url == 'rss' %}
<li><a class="white" href="{{site.baseurl}}/{{ entry.url }}">{{ entry.name }}</a></li> <li><a class="white" href="{{ site.baseurl_root }}/feed.xml">{{ entry.name }}</a></li>
{%endif%} {% else %}
<li><a class="white" href="{{ site.baseurl }}/{{ entry.url }}">{{ entry.name }}</a></li>
{% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
@ -24,9 +26,9 @@
<ul class="list-unstyled list-inline"> <ul class="list-unstyled list-inline">
{% for item in site.data.lang[site.lang].footer-2 %} {% for item in site.data.lang[site.lang].footer-2 %}
{% if item.url contains 'https://' %} {% if item.url contains 'https://' %}
<li><a href="{{item.url}}" class="white footer-link">{{item.name}}</a></li> <li><a href="{{ item.url }}" class="white footer-link">{{item.name}}</a></li>
{%else%} {%else%}
<li><a href="{{site.baseurl}}/{{item.url}}" class="white footer-link">{{item.name}}</a></li> <li><a href="{{ site.baseurl }}/{{ item.url }}" class="white footer-link">{{item.name}}</a></li>
{%endif%} {%endif%}
{% endfor %} {% endfor %}
</ul> </ul>