diff --git a/.wren/all.html b/.wren/all.html deleted file mode 100644 index 26c7822..0000000 --- a/.wren/all.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -
-Links follow through to category specific lists.
- -This is a placeholder line
- -" + summary + "
", - "" -for cat in catnames: - style = "font-size: {0}em;".format(catsizes[catnames.index(cat)]) - string += ''.format(cat, style) - string += cat + " " -string += "
\n" - -with open("../blog/cat/index.html", "r") as file: - lines = [line for line in file] -for line in lines: - if "" in line: - index = lines.index(line) + 1 - lines.pop(index) - lines.insert(index, string) -cloudfile = open("../blog/cat/index.html", "w+") -for line in lines: - cloudfile.write(line) -cloudfile.close() -print("Updated the category wordcloud") - - -sucess("Done!") diff --git a/_config.yml b/_config.yml index 7e493b3..aca85d8 100644 --- a/_config.yml +++ b/_config.yml @@ -95,4 +95,10 @@ social_links: # the other pages to appear in the middle. header_pages: - blog.md -- about.md \ No newline at end of file +- about.md + +# In the category-list.html include the font size of each category +# is calculated using (a*x + b)%, where x is the category size. +category_cloud: + a: 15 + b: 80 \ No newline at end of file diff --git a/_includes/meta.html b/_includes/meta.html index 10e7d46..6c130d7 100644 --- a/_includes/meta.html +++ b/_includes/meta.html @@ -12,9 +12,11 @@ + {%- assign original_date = p.original_date -%} + {%- assign modified_date = p.modified_date -%} {%- if p.modified_date -%} - {%- assign modified_date = p.modified_date | date: site.date_format | prepend: 'Updated on ' -%} + {%- assign modified_date = modified_date | date: site.date_format | prepend: 'Updated on ' -%} {%- assign original_date = original_date | append: '*' -%} {%- endif -%} • {%- include reading-time.html text=p.content -%} + + {%- if p.categories -%} + {% for category in p.categories %} + {%- if forloop.first == true %}• {% endif %} + {{ category }} + {%- if forloop.last == false %}, {% endif %} + {% endfor %} + {%- endif -%} {%- if p.author -%} • @@ -33,5 +43,5 @@ {%- if forloop.last == false %}, {% endif -%} {% endfor %} - {%- endif -%} + {%- endif -%} \ No newline at end of file diff --git a/_layouts/category-list.html b/_layouts/category-list.html new file mode 100644 index 0000000..bc76ef4 --- /dev/null +++ b/_layouts/category-list.html @@ -0,0 +1,48 @@ +--- +layout: page +--- + +{%- assign categories = site.categories | sort -%} +{%- assign cc_a = site.category_cloud.a -%} +{%- assign cc_b = site.category_cloud.b -%} + +