diff --git a/index.html b/index.html index e6e5558c..9d60845a 100644 --- a/index.html +++ b/index.html @@ -151,7 +151,7 @@ speak multiple languages and allow you to easily create localized websites.
Fetches publications from HAL
+
Version: 0.1.2
+Author: + + Nicolas Cedilnik + +
+ + ++ View all tags. +
+A plugin for Lektor that uses the HAL API +to easily maintain an up-to-date list of publications on a static website.
+HAL is an open archive where authors +can deposit scholarly documents from all academic fields.
+Add lektor-hal
to the [packages]
section of your .lektorproject
file.
In ./configs/hal.ini
, the query field must be specified, following to the
+HAL docs
Example:
+query = ((authIdHal_s:my-id-hal) OR (authFullName_s:"My Name"))
+
+<ul class="publications" id="publications">
+ {% for publi in hal_publications %}
+ <li>
+ <a href={{ publi.link }}>{{ publi.title }}</a>
+ @
+ {{ publi.where }} -
+ {{ publi.authors|join(', ') }}
+ ({{ publi.date }})
+ </li>
+ {% endfor %}
+</ul>
+
+Two global variables are available in your jinja template, hal_publications
and
+hal_request
.
hal_publications
A list of Publication
s, a dataclass with the following attributes:
raw
: A dict containing everything about this publication returned by the
+HAL API.title
: The title of the publicationhal_id
: The HAL ID of the publicationauthors
: A list of strings (author names)date
: A string (producedDate_s
)type
: The publication type, eg "ART", "COMM", "POSTER", etc/and properties:
+link
: URL pointing to the HAL resourcewhere
: returns where the article was published (journalTitle_s
or conferenceTitle_s
+if missing)hal_request
URL used for the HAL API request.
+Lektor will not 'know' that the page must be rebuilt when new entries are +returned by the HAL API request. +As a workaround, the plugin allows to mark any page as "dirty", so it is rebuilt +everytime. Add this to the template that uses the publications list:
+{{ volatile() }}
+
+
+
+
+
+