mirror of
https://github.com/clockworkpi/wiki.clockworkpi.com.git
synced 2026-03-21 19:32:40 +01:00
Add a _global_ collection
This commit is contained in:
24
_global/404.html
Normal file
24
_global/404.html
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
.container {
|
||||
margin: 10px auto;
|
||||
max-width: 600px;
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
margin: 30px 0;
|
||||
font-size: 4em;
|
||||
line-height: 1;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<h1>404</h1>
|
||||
|
||||
<p><strong>Page not found :(</strong></p>
|
||||
<p>The requested page could not be found.</p>
|
||||
</div>
|
||||
BIN
_global/favicon.ico
Normal file
BIN
_global/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
23
_global/feed.xml
Normal file
23
_global/feed.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: null
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ site.title }}</title>
|
||||
<description>{{ site.description }}</description>
|
||||
<link>{{ site.url }}</link>
|
||||
{% include /functions/wiki-pages.html %}
|
||||
{% for post in wiki_pages reversed%}
|
||||
{% unless post.draft %}
|
||||
<item>
|
||||
<title>{{ post.title | xml_escape }}</title>
|
||||
<description>{{ post.description | xml_escape | truncate: 300 }}</description>
|
||||
<pubDate>{{ post.created | date_to_xmlschema }}</pubDate>
|
||||
<link>{{ post.url | prepend: site.url | append: '.html'}}</link>
|
||||
<guid isPermaLink="true">{{ post.url | prepend: site.url | append: '.html' }}</guid>
|
||||
</item>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
||||
3
_global/index.html
Normal file
3
_global/index.html
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
layout: redirect
|
||||
---
|
||||
51
_global/tags.html
Normal file
51
_global/tags.html
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tags
|
||||
---
|
||||
{% assign var = 10 %}
|
||||
|
||||
{% comment %}
|
||||
=======================
|
||||
The following part extracts all the tags from your posts and sort tags, so that you do not need to manually collect your tags to a place.
|
||||
=======================
|
||||
{% endcomment %}
|
||||
{% assign rawtags = "" %}
|
||||
|
||||
{% include /functions/wiki-pages.html %}
|
||||
|
||||
{% for wiki_page in wiki_pages %}
|
||||
{% assign ttags = wiki_page.tags | join:'|' | append:'|' %}
|
||||
{% assign rawtags = rawtags | append:ttags %}
|
||||
{% endfor %}
|
||||
{% assign rawtags = rawtags | split:'|' | sort %}
|
||||
|
||||
{% comment %}
|
||||
=======================
|
||||
The following part removes dulpicated tags and invalid tags like blank tag.
|
||||
=======================
|
||||
{% endcomment %}
|
||||
|
||||
{% assign tags = "" %}
|
||||
{% for tag in rawtags %}
|
||||
{% if tag != "" %}
|
||||
{% if tags == "" %}
|
||||
{% assign tags = tag | split:'|' %}
|
||||
{% endif %}
|
||||
{% unless tags contains tag %}
|
||||
{% assign tags = tags | join:'|' | append:'|' | append:tag | split:'|' %}
|
||||
{% endunless %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<ul>
|
||||
{% for tag in tags %}
|
||||
<li id="n-tag-{{ tag }}"><a href="/{{ site.data.i18n[site.lang].prefix.tag }}{{ tag }}.html">{{ tag }}</a></li>
|
||||
<ul>
|
||||
{% for other_page in wiki_pages %}
|
||||
{% if other_page.tags contains tag %}
|
||||
<li><a href="{{ other_page.url }}">{{ other_page.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
Reference in New Issue
Block a user