Commit 23062f43 authored by Marcus M. Scheunemann's avatar Marcus M. Scheunemann

a template for the publications page, loaded by the publications page,...

a template for the publications page, loaded by the publications page, configuration in pelicanconf and add requirements
parent 01cdd1ec
Some testing page
#################
:template: publications
\ No newline at end of file
......@@ -39,15 +39,30 @@ DEFAULT_PAGINATION = 10
# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True
# path for seperate template files, used by, e.g., pelican-bibtex
# leave empty for now and just append in plugin configuration
THEME_TEMPLATES_OVERRIDES = []
# Plugins
PLUGIN_PATHS = ['../pelican-plugins', ]
PLUGIN_PATHS = ['../pelican-plugins', 'plugins/', ]
PLUGINS = ['i18n_subsites', ]
JINJA_ENVIRONMENT = {
'extensions': ['jinja2.ext.i18n'],
}
# Pelican-Bootstrap3 related configuration
# make sure plugin i18n_subsites is loaded, see Plugins
##
## Plugin settings: pelican-bibtex
##
PLUGINS.append('pelican-bibtex')
THEME_TEMPLATES_OVERRIDES.append('templates/pelican-bibtex')
PUBLICATIONS_SRC = 'content/publications_marcus-scheunemann.bib'
##
## Theme settings: pelican-bootstrap3
##
# info: make sure plugin i18n_subsites is loaded, see Plugins
THEME = '../pelican-themes/pelican-bootstrap3'
## adapt social links
......
pelican>=3.6.3
python-gettext==4.0
\ No newline at end of file
python-gettext==4.0
pybtex>=0.22.0
\ No newline at end of file
{% extends "base.html" %}
{% block title %}Publications{% endblock %}
{% block content %}
<script type="text/javascript">
function disp(s) {
var win;
var doc;
win = window.open("", "WINDOWID");
doc = win.document;
doc.open("text/plain");
doc.write("<pre>" + s + "</pre>");
doc.close();
}
</script>
<section id="content" class="body">
<h1 class="entry-title">Publications</h1>
<ul>
{% for key, year, text, bibtex, pdf, slides, poster in publications %}
<li id="{{ key }}">{{ text }}
[&nbsp;<a href="javascript:disp('{{ bibtex|replace('\n', '\\n')|escape|forceescape }}');">Bibtex</a>&nbsp;]
{% for label, target in [('PDF', pdf), ('Slides', slides), ('Poster', poster)] %}
{{ "[&nbsp;<a href=\"%s\">%s</a>&nbsp;]" % (target, label) if target }}
{% endfor %}
</li>
{% endfor %}
</ul>
</section>
{% endblock %}
\ No newline at end of file
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