<p>This Plugin should extend lektor with APA-styled citations using bibtex files. It was based on the known lektor-bibtex-support plugin by arunpersaud.<p>
<p>An APA-styled citation plugin for the lektor static content management system (<ahref="https://getlektor.com"rel="nofollow">https://getlektor.com</a>).</p>
<h2>Preparations</h2>
<p>Install the plugin by</p>
<pre><code>lektor plugin add lektor-citation
</code></pre>
<p>or by copying this repository into the <em>packages</em>-folder of your lektor-project.</p>
<p>Create an <em>citation.ini</em> in its <em>configs</em>-folder:</p>
<pre><code>[Bibtex]
file = Literature.bib
</code></pre>
<p>And put a <em>Literature.bib</em> BibTex-file into the project's <em>assets</em>-folder respectively.</p>
<h2>Jinja_env</h2>
<h3>Bibliography</h3>
<p>To get a formated output of your whole BibTex library you can either</p>
<ol>
<li>Use method citation_short_output in the template of your literature page. It creates an unordered list of entries.</li>
</ol>
<pre><code><ul id="literatur">
{% for entry in citation_entries() %}
{{ citation_short_output(entry)|decode|safe }}
{% endfor %}
</ul>
</code></pre>
<olstart="2">
<li>Use method citation_full_output instead. This creates a more complete html-output for every entry.</li>
<li>You may also use the citation_entry method in combination with <ahref="https://docs.pybtex.org/api/parsing.html#pybtex.database.Entry"rel="nofollow">pybtex*s <strong>Entry</strong>-class</a>. For example:</li>
<p>Both methods create a complete hyperlink inside your text for the entry with <em>id</em>. You may give it any url to the <em>link</em> parameter to e.g. link it to your bibliography page. The NP in the second stands for <em>No Parantheses</em>. So you'll receive e.g.</p>
<pre><code>AuthorI & AuthorII (2019)
</code></pre>
<p>or</p>
<pre><code>(AuthorI & AuthorII, 2019)
</code></pre>
<p>Thanks to the <strong>lektor-jinja-content</strong> plugin which is a dependency of this plugin you might also use the globals inside your markdown or html contents, too.</p>
</div>
</div>
</div>
</div>
</div>
<divclass="bottomsummary">
<divclass="container">
</div>
</div>
<footer>
<divclass="container">
<divclass="row">
<divclass="col-sm-4 icon-bar">
<ahref="https://github.com/lektor/lektor/"title="Lektor on GitHub"
><iclass="fa fa-github"></i></a>
<ahref="https://github.com/lektor/lektor/issues/"title="Report Issues for Lektor"
><iclass="fa fa-bug"></i></a>
<ahref="https://twitter.com/getlektor"title="Find Lektor on Twitter"
><iclass="fa fa-twitter"></i></a>
<ahref="https://gitter.im/lektor/lektor"title="Chat on Gitter"
><iclass="fa fa-comment"></i></a>
<ahref="https://github.com/lektor/lektor-website/tree/master/content/plugins/lektor-citation/contents.lr"title="View source for this page"><iclass="fa fa-code"></i></a>
</div>
<divclass="col-sm-8">
<ahref="../../license/">License & Copyright</a> •
<ahref="../../contact/">Contact</a> •
Made with <iclass="fa fa-fw fa-heart"title="Heart"><spanhidden>Heart</span></i> in Carinthia