Issue #6 List of pages per user

This commit is contained in:
Alexis Hassler
2019-05-18 11:21:16 +02:00
parent 45bc42f572
commit e285abc65b
21 changed files with 109 additions and 116 deletions

View File

@@ -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 -%}

View File

@@ -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 -%}

View File

@@ -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 -%}