Small fixes

This commit is contained in:
Alexis Hassler 2019-05-19 18:23:17 +02:00
parent a47fa3720f
commit a05643fc76
2 changed files with 11 additions and 5 deletions

View File

@ -3,10 +3,15 @@ layout: default
title: All pages
menu: ['global']
---
<ul class="columns">
{%- for page in site.data.wiki_pages -%}
<ul>
{%- assign sorted_page = site.data.wiki_pages | sort: "id" -%}
{%- for page in sorted_page -%}
{%- assign page_name = page.id | slice: 1, 50 -%}
{%- if page_name != page.title -%}
{%- assign page_name = page_name | append: " - " | append: page.title -%}
{%- endif -%}
<li>
<a href="{{ page.url }}.html">{{ page.title }}</a>&nbsp; [{{ page.bytes }} bytes]
<a href="{{ page.url }}.html">{{ page_name }}</a>&nbsp; [{{ page.bytes }} bytes]
{%- if page.author_full -%}&nbsp;(by <a href="{{ page.author_full.url }}.html">{{ page.author_full.name }}</a>) {%- endif -%}
</li>
{%- endfor -%}

View File

@ -4,12 +4,13 @@ title: Tags
menu: ['global']
---
<ul>
{%- for tag in site.data.wiki_tags -%}
{%- assign sorted_tags = site.data.wiki_tags | sort -%}
{%- for tag in sorted_tags -%}
{%- assign counter = 0 -%}
{%- for other_page in site.data.wiki_pages %}
{%- if other_page.tags contains tag -%}
{%- assign counter = counter | plus: 1 -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
<li><a href="/{{ site.data.i18n[site.lang].prefix.tag }}{{ tag }}.html">{{ tag }}</a> ({{counter}} pages)</li>