diff --git a/_includes/footer.html b/_includes/footer.html
index 30be027c..05a53b15 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -12,14 +12,7 @@
- {% assign source = site.repo | append: "/blob/main/pages" %}
- {% if page.collection == "en-US" %}
- {% assign source = source | append: "/_en-US" | append: page.url | replace: ".html", ".md" %}
- {% else %}
- {% assign url = page.url | remove_first: "/" %}
- {% assign source = source | append: "/_" | append: url | replace: ".html", ".md" %}
- {% endif %}
- {% assign source = source | %}
+ {% assign source = site.repo | append: "/blob/main/pages/" | append: page.path %}
{{ site.data[page.collection].strings.published-with | replace: "$1", source }}
diff --git a/_includes/nav.html b/_includes/nav.html
index 47b0cf8a..05fd1318 100644
--- a/_includes/nav.html
+++ b/_includes/nav.html
@@ -37,19 +37,21 @@
diff --git a/_layouts/wiki.html b/_layouts/wiki.html
index e0c2f0e0..474c347c 100644
--- a/_layouts/wiki.html
+++ b/_layouts/wiki.html
@@ -20,12 +20,11 @@ layout: compress
{% comment %} Get category list {% endcomment %}
{% assign items = site[page.collection] | where: "section", page.section | sort_natural: "title" %}
{% comment %} First do the index {% endcomment %}
- {% for item in items %}
- {% if item.url contains "index.html" %}
- {{ item.title }}
-
- {% endif %}
- {% endfor %}
+ {% assign item = items | where_exp: "item", "item.url contains 'index.html'" | first %}
+ {% if item %}
+ {{ item.title }}
+
+ {% endif %}
{% comment %} Then the pages not in categories {% endcomment %}
{% for item in items %}
@@ -36,13 +35,11 @@ layout: compress
{% comment %} Finally, the other pages {% endcomment %}
{% for cat in site.data[page.collection].categories[page.section] %}
-
-
+
{{ cat.title }}
- {% for item in items %}
- {% unless item.category == cat.key or item.category.first and item.category contains cat.key %}
- {% continue %}
- {% endunless %}
+ {% assign filtered = items | where: "category", cat.key %}
+ {% for item in filtered %}
- {{ item.title }}
{% endfor %}