Remove ".html"s

This commit is contained in:
Pk11 2021-01-03 00:38:17 -06:00
parent 41ed2a54ac
commit c6a2340158
3 changed files with 7 additions and 7 deletions

View File

@ -47,13 +47,13 @@
{% for item in site[collection.label] %}
{% assign itemRef = item.url | split: item.lang | last %}
{% if itemRef == ref %}
<li><a class="dropdown-item{% if item.lang == page.collection %} active{% endif %}" data-language-id="{{ item.lang }}" href="{{ item.url }}">{{ site.lang-names[item.lang] }}</a></li>
<li><a class="dropdown-item{% if item.lang == page.collection %} active{% endif %}" data-language-id="{{ item.lang }}" href="{{ item.url | remove: ".html" }}">{{ site.lang-names[item.lang] }}</a></li>
{% endif %}
{% endfor %}
{% endunless %}
{% endfor %}
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="{% for item in site.ic-IC %}{% assign itemRef = item.url | split: item.collection | last %}{% if itemRef == ref %}{{ item.url }}{% endif %}{% endfor %}">{{ site.data[page.collection].strings.translate-here }}</a></li>
<li><a class="dropdown-item" href="{% for item in site.ic-IC %}{% assign itemRef = item.url | split: item.collection | last %}{% if itemRef == ref %}{{ item.url | remove: ".html" }}{% endif %}{% endfor %}">{{ site.data[page.collection].strings.translate-here }}</a></li>
<li><a class="dropdown-item" href="https://crowdin.com/project/ds-homebrew-wiki">{{ site.data[page.collection].strings.translate-on-crowdin }}</a></li>
</ul>
</div>

View File

@ -1,8 +1,8 @@
<link rel="canonical" href="{{ site.url | append: page.url }}" />
<link rel="canonical" href="{{ page.url | absolute_url | remove: ".html" }}" />
<meta name="description" content="{{ page.description | default: site.data[page.collection].strings.description | escape }}" />
<meta property="og:title" content="{{ page.title | default: site.data[page.collection].strings.title | escape }}" />
<meta property="og:locale" content="{{ page.collection | default: "en_US"}}" />
<meta property="og:url" content="{{ site.url | append: page.url }}" />
<meta property="og:url" content="{{ page.url | absolute_url | remove: ".html" }}" />
<meta property="og:site_name" content="{{ site.data[page.collection].strings.title | escape }}" />
<meta property="og:image" content="{{ page.image | default: site.image }}">
<meta property="og:description" content="{{ page.description | default: site.data[page.collection].strings.description | escape }}" />

View File

@ -31,13 +31,13 @@ layout: compress
<!-- First do the index -->
{% for item in items %}
{% if item.url contains "index.html" %}
<li class="li-bullet {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
<li class="li-bullet {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url | remove: ".html" }}">{{ item.title }}</a></li>
{% endif %}
{% endfor %}
<!-- Then the pages not in categories -->
{% for item in items %}
{% unless item.url contains "index.html" or item.category %}
<li class="li-bullet {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
<li class="li-bullet {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url | remove: ".html" }}">{{ item.title }}</a></li>
{% endunless %}
{% endfor %}
<!-- Finally, the other pages -->
@ -50,7 +50,7 @@ layout: compress
{% unless item.category == cat or item.category.first and item.category contains cat %}
{% continue %}
{% endunless %}
<li class="{% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
<li class="{% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url | remove: ".html" }}">{{ item.title }}</a></li>
{% endfor %}
</ul>
</details>