mirror of
https://github.com/clockworkpi/wiki.clockworkpi.com.git
synced 2026-03-19 18:32:43 +01:00
Issue #6 List of pages per user
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
{%- include /functions/wiki-pages.html -%}
|
||||
|
||||
{%- if include.page -%}
|
||||
{%- assign source_page = include.source_page -%}
|
||||
{%- else -%}
|
||||
@@ -7,7 +5,7 @@
|
||||
{%- endif -%}
|
||||
|
||||
{%- assign redirect = source_page.redirect | liquify -%}
|
||||
{%- for other_page in wiki_pages -%}
|
||||
{%- for other_page in site.data.wiki_pages -%}
|
||||
{%- if other_page.id == redirect -%}
|
||||
{%- assign redirect_page = other_page -%}
|
||||
{%- endif -%}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{%- assign wiki_pages = '' | split: '' -%}
|
||||
{%- for collection in site.collections -%}
|
||||
{%- assign prefix = collection.label | slice: 0, 4 -%}
|
||||
{%- if prefix == 'wiki' -%}
|
||||
{%- assign wiki_pages = wiki_pages | concat: collection.docs -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
@@ -1,33 +0,0 @@
|
||||
{%- 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 -%}
|
||||
|
||||
{%- assign wiki_tags = tags -%}
|
||||
Reference in New Issue
Block a user