From c75ab3fd796aac58bc54ac22c09b2ea86bbd82cd Mon Sep 17 00:00:00 2001 From: Homer S Date: Fri, 21 Jan 2022 22:22:49 +0100 Subject: [PATCH] Updated the README --- README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ace9ee9..8b3a39c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,56 @@ # lektor-citation -An APA-style citation plugin for the lektor static content management system (https://getlektor.com). +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. +``` + +``` +2. 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 +``` +

{title}

{authors} ({pubYear})

+

{note}

+
+
+
{edition}
+
+
{editors}
+
+
{pages}
+
+
{issbn}
+
+
{publisher}
+
+```