An APA-style citation plugin for the lektor static content management system (https://getlektor.com).
Go to file
Homer S. c75ab3fd79 Updated the README 2022-01-21 22:22:49 +01:00
.gitignore Initial commit 2022-01-20 06:52:49 +01:00
LICENSE Initial commit 2022-01-20 06:52:49 +01:00
README.md Updated the README 2022-01-21 22:22:49 +01:00
lektor_citation.py Added full_output method. 2022-01-21 21:44:47 +01:00
setup.cfg Initial commit. 2022-01-20 07:02:55 +01:00
setup.py Initial commit. 2022-01-20 07:02:55 +01:00

README.md

lektor-citation

An APA-styled citation plugin for the lektor static content management system (https://getlektor.com).

Preparations

Install the plugin by

lektor plugin add lektor-citation

or by copying this repository into the packages-folder of your lektor-project.

Create an citation.ini in its configs-folder:

[Bibtex]
file = Literature.bib

And put a Literature.bib BibTex-file into the project's assets-folder respectively.

Jinja_env

To get a formated output of your whole BibTex library you can either

  1. Use method citation_short_output in the template of your literature page. It creates an unordered list of entries.
  <ul id="literatur">
  {% for entry in citation_entries() %}
  {{ citation_short_output(entry)|decode|safe }}
  {% endfor %}

</ul>
  1. Use method citation_full_output instead. This creates a more complete html-output for every entry.
  {% for entry in citation_entries() %}
  {{ citation_full_output(entry)|decode|safe }}
  {% endfor %}

produces

<h2>{title}</h2><h3>{authors} ({pubYear})</h3>
<p>{note}</p>
<dl class="literature">
<dt class="edition"></dt>
<dd>{edition}</dd>
<dt class="editors"></dt>
<dd>{editors}</dd>
<dt class="pages"></dt>
<dd>{pages}</dd>
<dt class="issbn"></dt>
<dd>{issbn}</dd>
<dt class="publisher"></dt>
<dd>{publisher}</dd>
</dl>