mirror of
https://github.com/clockworkpi/wiki.clockworkpi.com.git
synced 2025-12-12 08:48:51 +01:00
Issue #3 List of pages (long and short)
This commit is contained in:
parent
6689a5faa5
commit
a9c6585252
@ -23,5 +23,9 @@ global_pages:
|
||||
text: All the pages
|
||||
- url: /Special:RecentChanges
|
||||
text: Recent changes
|
||||
- url: /Special:LongPages
|
||||
text: Long pages
|
||||
- url: /Special:ShortPages
|
||||
text: Short pages
|
||||
- url: /Special:ListUsers
|
||||
text: All the users
|
||||
|
||||
@ -23,5 +23,9 @@ global_pages:
|
||||
text: Tous les pages
|
||||
- url: /Special:RecentChanges
|
||||
text: Modifications récentes
|
||||
- url: /Special:LongPages
|
||||
text: Pages longues
|
||||
- url: /Special:ShortPages
|
||||
text: Pages courtes
|
||||
- url: /Special:ListUsers
|
||||
text: Tous les utilisateurs
|
||||
|
||||
@ -7,7 +7,7 @@ menu: ['global']
|
||||
<ul class="columns">
|
||||
{%- for page in wiki_pages -%}
|
||||
<li>
|
||||
<a href="/{{ page.slug }}.html">{{ page.title }}</a>
|
||||
<a href="{{ page.url }}.html">{{ page.title }}</a> [{{ page.bytes }} bytes]
|
||||
{%- if page.author -%} (by <a href="/{{ site.data.i18n[site.lang].prefix.user }}{{ page.author }}.html">{{ page.author }}</a>) {%- endif -%}
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
|
||||
14
_global/Special:LongPages.html
Normal file
14
_global/Special:LongPages.html
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
layout: default
|
||||
title: Long pages
|
||||
menu: ['global']
|
||||
---
|
||||
{%- include /functions/wiki-pages.html -%}
|
||||
{%- assign long_pages = wiki_pages | sort: 'bytes' | reverse -%}
|
||||
<ol>
|
||||
{%- for page in long_pages limit:50 -%}
|
||||
<li>
|
||||
<a href="{{ page.url }}.html">{{ page.title }}</a> [{{ page.bytes }} bytes]
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ol>
|
||||
@ -8,7 +8,7 @@ menu: ['global']
|
||||
<ul>
|
||||
{%- for page in recent_changes limit:20 -%}
|
||||
<li>
|
||||
<a href="/{{ page.slug }}.html">{{ page.title }}</a>
|
||||
<a href="{{ page.url }}.html">{{ page.title }}</a>
|
||||
- {{ page.modified }}
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
|
||||
14
_global/Special:ShortPages.html
Normal file
14
_global/Special:ShortPages.html
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
layout: default
|
||||
title: Short pages
|
||||
menu: ['global']
|
||||
---
|
||||
{%- include /functions/wiki-pages.html -%}
|
||||
{%- assign long_pages = wiki_pages | sort: 'bytes' -%}
|
||||
<ol>
|
||||
{%- for page in long_pages limit:50 -%}
|
||||
<li>
|
||||
<a href="{{ page.url }}.html">{{ page.title }}</a> [{{ page.bytes }} bytes]
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ol>
|
||||
13
_plugins/hook-wiki-page-enhancer.rb
Normal file
13
_plugins/hook-wiki-page-enhancer.rb
Normal file
@ -0,0 +1,13 @@
|
||||
Jekyll::Hooks.register :documents, :pre_render do |post|
|
||||
end
|
||||
|
||||
Jekyll::Hooks.register :documents, :post_render do |doc|
|
||||
# Jekyll.logger.info "Generating:", "Firing :pages, :post_render for : #{post.content}"
|
||||
if doc.content then
|
||||
doc.data['size']=doc.content.size
|
||||
doc.data['bytes']=doc.content.bytesize
|
||||
else
|
||||
doc.data['size']=0
|
||||
doc.data['bytes']=0
|
||||
end
|
||||
end
|
||||
@ -6,7 +6,9 @@ body {
|
||||
|
||||
#main {
|
||||
background: #ffffff;
|
||||
border-left: #acabab solid 2px;
|
||||
padding: 1em;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
#menu {
|
||||
|
||||
@ -5,7 +5,7 @@ tags: Example
|
||||
toc: false
|
||||
author: Alexis
|
||||
created: 2009-01-01
|
||||
modified: 2009-01-01
|
||||
modified: 2009-01-02
|
||||
revisions:
|
||||
- author: Alexis
|
||||
date: 2009-01-01
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user