Lektor-HAL
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.
Configuration
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"))
Usage
Example
<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 Publications, 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_sorconferenceTitle_sif missing)
hal_request
URL used for the HAL API request.
Known caveat
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() }}
Metadata
Release files for lektor-hal 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lektor-hal-0.1.2.tar.gz | 3.1 kB | Without provenance | Details for lektor-hal-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lektor_hal-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for lektor_hal-0.1.2-py3-none-any.whl |
Total release size: 6.5 kB
Release files / lektor-hal-0.1.2.tar.gz
| Download URL | lektor-hal-0.1.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43d8cad235d2074235207ecfec5120f08706c26aeb50f41be17d91febf8391c4
|
|
BLAKE2b-256 checksum How to use checksums |
b45e9388b27a564bda58fc47ea4b54ff70e82ca6b8bd32c775f90ec51df5eaeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
|
Release files / lektor_hal-0.1.2-py3-none-any.whl
| Download URL | lektor_hal-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95d110ff171b83941fd4f804c78e1cdb067bb6bf7e88a5763e50e9fc02697a28
|
|
BLAKE2b-256 checksum How to use checksums |
e70f7b3b305440f907772448df9abfb3e79fc519b024430d9ec02964ebfde756
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
|
Security for lektor-hal 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.