mirror of
https://github.com/clockworkpi/wiki.clockworkpi.com.git
synced 2025-12-12 08:48:51 +01:00
Remove html suffixes
This commit is contained in:
parent
a05643fc76
commit
07f1eca644
29
.htaccess
29
.htaccess
@ -1,10 +1,33 @@
|
|||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
|
# ################
|
||||||
|
# RSS
|
||||||
|
# ################
|
||||||
RewriteCond %{QUERY_STRING} ^title=Special:Newpages\&feed=rss$
|
RewriteCond %{QUERY_STRING} ^title=Special:Newpages\&feed=rss$
|
||||||
RewriteRule ^index\.php$ /feed.xml? [R=301,L]
|
RewriteRule ^index\.php$ https://%{HTTP_HOST}/feed.xml [R=301,NE,QSD,L]
|
||||||
|
|
||||||
|
# ################
|
||||||
|
# Conmpanion pages
|
||||||
|
# ################
|
||||||
RewriteCond %{QUERY_STRING} ^title=Sp%C3%A9cial:Nouvelles_pages&feed=rss$
|
RewriteCond %{QUERY_STRING} ^title=Sp%C3%A9cial:Nouvelles_pages&feed=rss$
|
||||||
RewriteRule ^index\.php$ /feed.xml? [R=301,L]
|
RewriteRule ^index\.php$ https://%{HTTP_HOST}/feed.xml [R=301,NE,QSD,L]
|
||||||
|
|
||||||
|
RewriteCond %{QUERY_STRING} ^title=Special:Export/(.*)$
|
||||||
|
RewriteRule ^index\.php$ https://%{HTTP_HOST}/%1 [R=301,NE,QSD,L]
|
||||||
|
|
||||||
|
RewriteCond %{QUERY_STRING} ^title=Sp%C3%A9cial:Exporter/(.*)$
|
||||||
|
RewriteRule ^index\.php$ https://%{HTTP_HOST}/%1 [R=301,NE,QSD,L]
|
||||||
|
|
||||||
|
RewriteCond %{QUERY_STRING} ^title=Discussion:(.*)$
|
||||||
|
RewriteRule ^index\.php$ https://%{HTTP_HOST}/%1 [R=301,NE,QSD,L]
|
||||||
|
|
||||||
|
# ################
|
||||||
|
# Main pages
|
||||||
|
# ################
|
||||||
RewriteCond %{QUERY_STRING} [^&?]*?=([^&?]*)[&]?(.*)
|
RewriteCond %{QUERY_STRING} [^&?]*?=([^&?]*)[&]?(.*)
|
||||||
RewriteRule ^index\.php$ /%1.html?%2 [R=301,L]
|
RewriteRule ^index\.php$ https://%{HTTP_HOST}/%1?%2 [R=301,NE,L]
|
||||||
|
|
||||||
|
# ################
|
||||||
|
# Error pages
|
||||||
|
# ################
|
||||||
|
ErrorDocument 404 https://%{HTTP_HOST}/404
|
||||||
@ -11,8 +11,8 @@ menu: ['global']
|
|||||||
{%- assign page_name = page_name | append: " - " | append: page.title -%}
|
{%- assign page_name = page_name | append: " - " | append: page.title -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ page.url }}.html">{{ page_name }}</a> [{{ page.bytes }} bytes]
|
<a href="{{ page.url }}">{{ page_name }}</a> [{{ page.bytes }} bytes]
|
||||||
{%- if page.author_full -%} (by <a href="{{ page.author_full.url }}.html">{{ page.author_full.name }}</a>) {%- endif -%}
|
{%- if page.author_full -%} (by <a href="{{ page.author_full.url }}">{{ page.author_full.name }}</a>) {%- endif -%}
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -13,6 +13,6 @@ menu: ['global']
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
||||||
<li><a href="/{{ site.data.i18n[site.lang].prefix.tag }}{{ tag }}.html">{{ tag }}</a> ({{counter}} pages)</li>
|
<li><a href="/{{ site.data.i18n[site.lang].prefix.tag }}{{ tag }}">{{ tag }}</a> ({{counter}} pages)</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -7,7 +7,7 @@ menu: ['global']
|
|||||||
{%- for source_page in site.data.wiki_redirects -%}
|
{%- for source_page in site.data.wiki_redirects -%}
|
||||||
<li>
|
<li>
|
||||||
{%- assign redirect_page = source_page.redirect_target -%}
|
{%- assign redirect_page = source_page.redirect_target -%}
|
||||||
<a href="{{ source_page.url }}.html">{{ source_page.id }}</a> → <a href="{{ redirect_page.url }}.html">{{ redirect_page.title }}</a>
|
<a href="{{ source_page.url }}">{{ source_page.id }}</a> → <a href="{{ redirect_page.url }}">{{ redirect_page.title }}</a>
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -6,7 +6,7 @@ menu: ['global']
|
|||||||
<ul>
|
<ul>
|
||||||
{%- for author in site.data.authors -%}
|
{%- for author in site.data.authors -%}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ author.url }}.html">{{ author.name }}</a> (<a href="{{ author.contributions_url }}.html">{{author.contributions_count}} pages</a>)
|
<a href="{{ author.url }}">{{ author.name }}</a> (<a href="{{ author.contributions_url }}">{{author.contributions_count}} pages</a>)
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -7,7 +7,7 @@ menu: ['global']
|
|||||||
<ol>
|
<ol>
|
||||||
{%- for page in long_pages limit:50 -%}
|
{%- for page in long_pages limit:50 -%}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ page.url }}.html">{{ page.title }}</a> [{{ page.bytes }} bytes]
|
<a href="{{ page.url }}">{{ page.title }}</a> [{{ page.bytes }} bytes]
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ol>
|
</ol>
|
||||||
|
|||||||
@ -7,7 +7,7 @@ menu: ['global']
|
|||||||
<ul>
|
<ul>
|
||||||
{%- for page in recent_changes limit:20 -%}
|
{%- for page in recent_changes limit:20 -%}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ page.url }}.html">{{ page.title }}</a>
|
<a href="{{ page.url }}">{{ page.title }}</a>
|
||||||
- {{ page.modified }}
|
- {{ page.modified }}
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ menu: ['global']
|
|||||||
<ol>
|
<ol>
|
||||||
{%- for page in long_pages limit:50 -%}
|
{%- for page in long_pages limit:50 -%}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ page.url }}.html">{{ page.title }}</a> [{{ page.bytes }} bytes]
|
<a href="{{ page.url }}">{{ page.title }}</a> [{{ page.bytes }} bytes]
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ol>
|
</ol>
|
||||||
|
|||||||
@ -7,14 +7,15 @@ layout: null
|
|||||||
<title>{{ site.title }}</title>
|
<title>{{ site.title }}</title>
|
||||||
<description>{{ site.description }}</description>
|
<description>{{ site.description }}</description>
|
||||||
<link>{{ site.url }}</link>
|
<link>{{ site.url }}</link>
|
||||||
{% for post in site.data.wiki_pages reversed%}
|
{% assign wiki_pages = site.data.wiki_pages | sort: 'created' %}
|
||||||
|
{% for post in wiki_pages reversed%}
|
||||||
{% unless post.draft %}
|
{% unless post.draft %}
|
||||||
<item>
|
<item>
|
||||||
<title>{{ post.title | xml_escape }}</title>
|
<title>{{ post.title | xml_escape }}</title>
|
||||||
<description>{{ post.description | xml_escape | truncate: 300 }}</description>
|
<description>{{ post.excerpt | strip_html }}</description>
|
||||||
<pubDate>{{ post.created | date_to_xmlschema }}</pubDate>
|
<pubDate>{{ post.created | date_to_xmlschema }}</pubDate>
|
||||||
<link>{{ post.url | prepend: site.url | append: '.html'}}</link>
|
<link>{{ post.url | prepend: site.url}}</link>
|
||||||
<guid isPermaLink="true">{{ post.url | prepend: site.url | append: '.html' }}</guid>
|
<guid isPermaLink="true">{{ post.url | prepend: site.url }}</guid>
|
||||||
</item>
|
</item>
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ title: Tags
|
|||||||
---
|
---
|
||||||
<ul>
|
<ul>
|
||||||
{% for tag in site.data.wiki_tags %}
|
{% for tag in site.data.wiki_tags %}
|
||||||
<li id="n-tag-{{ tag }}"><a href="/{{ site.data.i18n[site.lang].prefix.tag }}{{ tag }}.html">{{ tag }}</a></li>
|
<li id="n-tag-{{ tag }}"><a href="/{{ site.data.i18n[site.lang].prefix.tag }}{{ tag }}">{{ tag }}</a></li>
|
||||||
<ul>
|
<ul>
|
||||||
{% for other_page in site.data.wiki_pages %}
|
{% for other_page in site.data.wiki_pages %}
|
||||||
{% if other_page.tags contains tag %}
|
{% if other_page.tags contains tag %}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<h3>{{ site.data.i18n[site.lang].label.global_pages }}</h3>
|
<h3>{{ site.data.i18n[site.lang].label.global_pages }}</h3>
|
||||||
<ul class="portlet-body">
|
<ul class="portlet-body">
|
||||||
{%- for link in site.data.i18n[site.lang].global_pages -%}
|
{%- for link in site.data.i18n[site.lang].global_pages -%}
|
||||||
<li><a href="{{link.url}}.html">{{link.text}}</a></li>
|
<li><a href="{{link.url}}">{{link.text}}</a></li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
<div id="logo">
|
<div id="logo">
|
||||||
<a href="/{{ site.data.i18n[site.lang].home }}.html" style="background-image: url({{ site.data.i18n[site.lang].logo }});" title="{{ site.data.i18n[site.lang].label.main_page }}"></a>
|
<a href="/{{ site.data.i18n[site.lang].home }}" style="background-image: url({{ site.data.i18n[site.lang].logo }});" title="{{ site.data.i18n[site.lang].label.main_page }}"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -4,11 +4,11 @@
|
|||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<ul>
|
<ul>
|
||||||
{%- for tag in page.tags -%}
|
{%- for tag in page.tags -%}
|
||||||
<li id="n-tag-{{ tag }}"><a href="/{{ site.data.i18n[site.lang].prefix.tag }}{{ tag }}.html">{{ tag }}</a></li>
|
<li id="n-tag-{{ tag }}"><a href="/{{ site.data.i18n[site.lang].prefix.tag }}{{ tag }}">{{ tag }}</a></li>
|
||||||
<ul>
|
<ul>
|
||||||
{%- for other_page in site.data.wiki_pages -%}
|
{%- for other_page in site.data.wiki_pages -%}
|
||||||
{%- if other_page.tags contains tag and other_page.id != page.id -%}
|
{%- if other_page.tags contains tag and other_page.id != page.id -%}
|
||||||
<li><a href="{{ other_page.url }}.html">{{ other_page.title }}</a></li>
|
<li><a href="{{ other_page.url }}">{{ other_page.title }}</a></li>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -5,7 +5,7 @@ menu: ['global']
|
|||||||
<ul class="columns">
|
<ul class="columns">
|
||||||
{%- for doc in page.author_full.contributions -%}
|
{%- for doc in page.author_full.contributions -%}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ doc.url }}.html">{{ doc.title }}</a>
|
<a href="{{ doc.url }}">{{ doc.title }}</a>
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<div class="redirectMsg">
|
<div class="redirectMsg">
|
||||||
<p>{{ site.data.i18n[site.lang].label.redirect }} :</p>
|
<p>{{ site.data.i18n[site.lang].label.redirect }} :</p>
|
||||||
<ul class="redirectText">
|
<ul class="redirectText">
|
||||||
<li><a href="{{ redirect_page.url }}.html" title="{{ redirect_page.name }}">{{ redirect_page.title }}</a></li>
|
<li><a href="{{ redirect_page.url }}" title="{{ redirect_page.name }}">{{ redirect_page.title }}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -11,12 +11,12 @@ module Jekyll
|
|||||||
def initialize(site, author)
|
def initialize(site, author)
|
||||||
@site = site
|
@site = site
|
||||||
@base = site.source
|
@base = site.source
|
||||||
@name = "#{author['contributions_url']}.html"
|
@name = "#{author['contributions_url']}"
|
||||||
|
|
||||||
self.process(@name)
|
self.process(@name)
|
||||||
self.read_yaml(File.join(@base, '_layouts'), 'contributions.html')
|
self.read_yaml(File.join(@base, '_layouts'), 'contributions')
|
||||||
self.data['author_full'] = author
|
self.data['author_full'] = author
|
||||||
self.data['title'] = "Contributions by <a href=\"/#{site.data['i18n'][site.config['lang']]['prefix']['user']}#{author['id']}.html\">#{author['name']}</a>"
|
self.data['title'] = "Contributions by <a href=\"/#{site.data['i18n'][site.config['lang']]['prefix']['user']}#{author['id']}\">#{author['name']}</a>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -249,10 +249,10 @@ References:
|
|||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
* Example of a [new page](New.html)
|
* Example of a [new page](New)
|
||||||
* Example of a [legacy page](Old.html)
|
* Example of a [legacy page](Old)
|
||||||
* Example of a [redirected page](Redirect.html)
|
* Example of a [redirected page](Redirect)
|
||||||
* Example of a [user page](./User:Alexis.html)
|
* Example of a [user page](./User:Alexis)
|
||||||
* [RSS](feed.xml) feed of new pages
|
* [RSS](feed.xml) feed of new pages
|
||||||
* Example of a [tag page](./Tag:Example.html)
|
* Example of a [tag page](./Tag:Example)
|
||||||
* [All tags page](./tags.html)
|
* [All tags page](./tags)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user