diff --git a/_config.yml b/_config.yml index cc65f6b..8e28f4f 100644 --- a/_config.yml +++ b/_config.yml @@ -29,7 +29,7 @@ gitlab_username: foo-dogsquared linkedin_username: gabriel-arazas twitter_username: foo_dogsquared paginate: 10 -paginate_path: '/page:num/' +paginate_path: 'page/:num/' # Enabling Disqus disqus: @@ -48,15 +48,27 @@ pinpost: ["A Freebie's Resource List (Mostly Related to Programming)"] google_analytics: UA-126718538-1 +collections: + generators: + output: true + permalink: data/:name + # Default settings defaults: - scope: - path: "" + path: "_posts" type: "posts" values: permalink: posts/:title + layout: post comments: true + - + scope: + path: "_generators" + type: "generators" + values: + layout: generator # Exclude from processing. # The following items will not be processed, by default. Create a custom list diff --git a/_generators/categories.md b/_generators/categories.md new file mode 100644 index 0000000..181cb55 --- /dev/null +++ b/_generators/categories.md @@ -0,0 +1,4 @@ +--- +data: categories +title: Categories +--- diff --git a/_generators/tags.md b/_generators/tags.md new file mode 100644 index 0000000..5bd6630 --- /dev/null +++ b/_generators/tags.md @@ -0,0 +1,4 @@ +--- +data: tags +title: Tags +--- diff --git a/_includes/libraries.html b/_includes/libraries.html index 8a4aced..8fa33af 100644 --- a/_includes/libraries.html +++ b/_includes/libraries.html @@ -1,2 +1,14 @@ + \ No newline at end of file diff --git a/_includes/post_meta.html b/_includes/post_meta.html index e75f21b..1de3283 100644 --- a/_includes/post_meta.html +++ b/_includes/post_meta.html @@ -1,22 +1,25 @@
Updated: {{ page.updatedOn | escape }}
- {%- endif -%} + +Updated: {{ page.updatedOn | escape }}
+ {%- endif -%} \ No newline at end of file diff --git a/_layouts/generator.html b/_layouts/generator.html new file mode 100644 index 0000000..00c38d0 --- /dev/null +++ b/_layouts/generator.html @@ -0,0 +1,57 @@ +--- +layout: default +--- + +{%- if content -%} + {{ content }} +{%- endif -%} + + +{%- if page.data -%} + {% assign page_data = page.data %} + {% assign rawdata = "" %} + {% for post in site.posts %} + {% assign tdata = post[page_data] | join:'|' | append:'|' %} + {% assign rawdata = rawdata | append:tdata %} + {% endfor %} + {% assign rawdata = rawdata | split:'|' | sort %} + + {% assign data = "" %} + {% for datum in rawdata %} + {% if datum != "" %} + {% if data == "" %} + {% assign data = datum | split:'|' %} + {% endif %} + {% unless data contains datum %} + {% assign data = data | join:'|' | append:'|' | append:datum | split:'|' %} + {% endunless %} + {% endif %} + {% endfor %} + +