remove categories, use only tags

This commit is contained in:
avitex 2020-04-14 20:37:55 +10:00
parent 091f630af2
commit b7ca40eb5a
Signed by: avitex
GPG Key ID: 38C76CBF3749D62C
6 changed files with 3 additions and 30 deletions

View File

@ -9,7 +9,6 @@ generate_rss = true
taxonomies = [
{name = "blog/tags", rss = true},
{name = "blog/categories", rss = true}
]
[extra]
@ -20,7 +19,6 @@ name = "Blog"
url = "/blog"
sub = [
{name = "Latest", url = "/blog"},
{name = "Categories", url = "/blog/categories"},
{name = "Tags", url = "/blog/tags"}
]

View File

@ -3,8 +3,7 @@ title = "Hello World"
date = 2018-08-22
[taxonomies]
"blog/tags" = ["new"]
"blog/categories" = ["meta"]
"blog/tags" = ["meta", "new"]
+++
Thought it would be a good idea to have somewhere to put my ramblings, and so I am here.

View File

@ -1,12 +0,0 @@
{% extends "content.html" %}
{% block title %}Categories - {{ config.title }}{% endblock %}
{% block content %}
<h1>Categories</h1>
{% if terms %}
<ul>
{% for term in terms %}
<li><a href="{{ term.permalink }}">{{ term.name }}</a> ({{ term.pages | length }})</li>
{% endfor %}
</ul>
{% endif %}
{% endblock content %}

View File

@ -1,9 +0,0 @@
{% extends "content.html" %}
{% import "post_macros.html" as post_macros %}
{% block title %}Category {{ term.name }} - {{ config.title }}{% endblock %}
{% block content %}
<h1>Category: <code>{{ term.name }}</code> <small>(<a href="{{ get_taxonomy_url(kind="blog/categories", name=term.name) }}rss.xml">RSS</a>)</small></h1>
{% for page in term.pages %}
{{ post_macros::page_in_list(page=page) }}
{% endfor %}
{% endblock content %}

View File

@ -18,13 +18,9 @@
{% if config.extra.author %}
Published by {{ config.extra.author }}
{% endif %}
{% if page.taxonomies | get(key="blog/categories") %}
{% set categories = page.taxonomies | get(key="blog/categories") %}
in <a href="{{ get_taxonomy_url(kind="blog/categories", name=categories[0]) | safe }}">{{ categories[0] }}</a>
{% endif %}
{% set tags = page.taxonomies | get(key="blog/tags") %}
{% if tags %}
and tagged
with tags
{% for tag in tags %}
<a href="{{ get_taxonomy_url(kind="blog/tags", name=tag) | safe }}">{{ tag }}</a>
{% if tags | length > 1 %}

View File

@ -1,5 +1,6 @@
{% extends "content.html" %}
{% block title %}Tag - {{ config.title }}{% endblock %}
{% block meta_description %}Full list of tags used for articles within the blog.{% endblock meta_description %}
{% block content %}
<h1>Tags</h1>
{% if terms %}