Commit 75491ecf authored by Marcus M. Scheunemann's avatar Marcus M. Scheunemann

load new plugin, template which splits publications into lists by their tag,...

load new plugin, template which splits publications into lists by their tag, displays tag as header and groups publications by year (newest first)
parent 34aef775
......@@ -71,7 +71,7 @@ PLUGINS.append('pelican_youtube')
##
PLUGINS.append('pelican_bib')
THEME_TEMPLATES_OVERRIDES.append('templates/pelican-bibtex')
THEME_TEMPLATES_OVERRIDES.append('templates/pelican-bib')
PUBLICATIONS_SRC = 'content/publications_marcus-scheunemann.bib'
PUBLICATIONS_SPLIT_BY = 'tags'
PUBLICATIONS_UNTAGGED_TITLE = 'Others'
......
......@@ -16,8 +16,6 @@
{% if page.title %}
<h1 class="entry-title">{{ page.title }}</h1>
{% endif %}
{% import 'includes/translations.html' as translations with context %}
{{ translations.translations_for(page) }}
{% if PDF_PROCESSOR %}
<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">
get the pdf
......@@ -26,26 +24,29 @@
<div class="entry-content">
{{ page.content }}
<hr />
<ul>
{% for grouper, publist in publications|groupby('year')|reverse %}
<li> {{grouper}}
<ul>
{% for publication in publist %}
<li id="{{ publication.bibkey }}">{{ publication.text }}
[&nbsp;<a href="javascript:disp('{{ publication.bibtex|replace('\n', '\\n')|escape|forceescape }}');">Bibtex</a>&nbsp;]
{% for label, target in [('PDF', publication.pdf), ('Slides', publication.slides), ('Poster', publication.poster)] %}
{{ "[&nbsp;<a href=\"%s\">%s</a>&nbsp;]" % (target, label) if target }}
{% endfor %}
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
{% if page.comments == 'enabled' %}
{% include 'includes/comments.html' %}
{% for tag in publications_lists %}
{% if publications_lists|length > 1 %}
<h2>{{tag}}</h2>
{% endif %}
{% for group, publist in publications_lists[tag]|groupby('year')|reverse %}
<h3>{{group}}</h3>
<ul>
{% for publication in publist|sort(True, attribute='year') %}
<li id="{{ publication.bibkey }}">{{ publication.text }}
[&nbsp;<a href="javascript:disp('{{ publication.bibtex|replace('\n', '\\n')|escape|forceescape }}');">Bibtex</a>&nbsp;]
{% for label, target in [('PDF', publication.pdf), ('Slides', publication.slides), ('Poster', publication.poster)] %}
{{ "[&nbsp;<a href=\"%s\">%s</a>&nbsp;]" % (target, label) if target }}
{% endfor %}
</li>
{% endfor %}
</ul>
{% endfor %}
{% endfor %}
{% if page.comments == 'enabled' %}
{% include 'includes/comments.html' %}
{% endif %}
</div>
</section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment