Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add categories.html template to default theme. Fixes #2972 #2973

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pelican/tests/output/basic/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ <h1><a href="/">A Pelican Blog</a></h1>
<li><a href="/category/yeah.html">yeah</a></li>
</ul></nav>
</header><!-- /#banner -->
<h1>Categories on A Pelican Blog</h1>

<section id="content" class="body">
<h1>Categories for A Pelican Blog</h1>
<ul>
<li><a href="/category/bar.html">bar</a> (1)</li>
<li><a href="/category/cat1.html">cat1</a> (4)</li>
<li><a href="/category/misc.html">misc</a> (4)</li>
<li><a href="/category/yeah.html">yeah</a> (1)</li>
</ul>
</section>

<section id="extras" class="body">
<div class="social">
<h2>social</h2>
Expand Down
6 changes: 5 additions & 1 deletion pelican/tests/output/custom/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ <h1><a href="./">Alexis' log <strong>A personal blog.</strong></a></h1>
<li><a href="./category/bar.html">bar</a></li>
</ul></nav>
</header><!-- /#banner -->
<h1>Categories on Alexis' log</h1>

<section id="content" class="body">
<h1>Categories for Alexis' log</h1>
<ul>
<li><a href="./category/bar.html">bar</a> (1)</li>
<li><a href="./category/cat1.html">cat1</a> (4)</li>
<li><a href="./category/misc.html">misc</a> (4)</li>
<li><a href="./category/yeah.html">yeah</a> (1)</li>
</ul>
</section>

<section id="extras" class="body">
<div class="blogroll">
<h2>links</h2>
Expand Down
6 changes: 5 additions & 1 deletion pelican/tests/output/custom_locale/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ <h1><a href="./">Alexis' log</a></h1>
<li><a href="./category/bar.html">bar</a></li>
</ul></nav>
</header><!-- /#banner -->
<h1>Categories on Alexis' log</h1>

<section id="content" class="body">
<h1>Categories for Alexis' log</h1>
<ul>
<li><a href="./category/bar.html">bar</a> (1)</li>
<li><a href="./category/cat1.html">cat1</a> (4)</li>
<li><a href="./category/misc.html">misc</a> (4)</li>
<li><a href="./category/yeah.html">yeah</a> (1)</li>
</ul>
</section>

<section id="extras" class="body">
<div class="blogroll">
<h2>links</h2>
Expand Down
16 changes: 16 additions & 0 deletions pelican/themes/notmyidea/templates/categories.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends "base.html" %}

{% block title %}{{ SITENAME }} - Categories{% endblock %}

{% block content %}

<section id="content" class="body">
<h1>Categories for {{ SITENAME }}</h1>
<ul>
{% for category, articles in categories|sort %}
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
</section>

{% endblock %}