Bibtex file support to easily include publication lists.
Project description
# Lektor Bibtex Plugin
The plugin allows adding a list of publications generated from bibtex files to a page.
## Enabling the plugin
To enable the plugin add this to your project file:
```
[packages]
lektor-bibtex-support = 0.1
```
## Configuring
Create a file configs/bibtex-support.ini with a section called Bibtex. Define a variable files that
is a white space separated list of bibtex files. Put these files into the assets directory of your project.
```
[Bibtex]
files = A.bib B.bib
```
Optionally you can also create a template file that should leave in the template directory to render the bibtex entries. If you skip this entry a default template will be used that sorts the entries by year.
## Usage
You can add the the publication anywhere in your jinja template by calling
```
{{ list_publications(name=name, tag=tag, year=year, labels=labels, fname=fname)|safe }}
```
The arguments are optional and can be used for filtering.
By name: the name has to show up in the author list to be included
by year: only publications from this year
labels: white space separated list of bibtex labels (the name of each entry in the bibtex file)
fname: white space separated list files to search (by default all files will be searched)
## Javascript
For the default template, you can also add the following javascript to show some entries if you have a long list (relies on jquery):
```
$(document).ready(function()
{
$(".BIBTeX").hide();
$(".BIBTeXtoggle").click( function () {
$(this).parent().children(".BIBTeX").toggle(300);
return false;
});
$(".BIBYear").hide();
$(".BIBYear:first").show();
$(".BIBYearheader").click( function () {
$(this).parent().children(".BIBYear").toggle(300);
return false;
});
$(".bibshowall").click( function () {
$(".BIBYear").show();
});
$(".bibhideall").click( function () {
$(".BIBYear").hide();
$(".BIBYear:first").show();
});
});
```
The plugin allows adding a list of publications generated from bibtex files to a page.
## Enabling the plugin
To enable the plugin add this to your project file:
```
[packages]
lektor-bibtex-support = 0.1
```
## Configuring
Create a file configs/bibtex-support.ini with a section called Bibtex. Define a variable files that
is a white space separated list of bibtex files. Put these files into the assets directory of your project.
```
[Bibtex]
files = A.bib B.bib
```
Optionally you can also create a template file that should leave in the template directory to render the bibtex entries. If you skip this entry a default template will be used that sorts the entries by year.
## Usage
You can add the the publication anywhere in your jinja template by calling
```
{{ list_publications(name=name, tag=tag, year=year, labels=labels, fname=fname)|safe }}
```
The arguments are optional and can be used for filtering.
By name: the name has to show up in the author list to be included
by year: only publications from this year
labels: white space separated list of bibtex labels (the name of each entry in the bibtex file)
fname: white space separated list files to search (by default all files will be searched)
## Javascript
For the default template, you can also add the following javascript to show some entries if you have a long list (relies on jquery):
```
$(document).ready(function()
{
$(".BIBTeX").hide();
$(".BIBTeXtoggle").click( function () {
$(this).parent().children(".BIBTeX").toggle(300);
return false;
});
$(".BIBYear").hide();
$(".BIBYear:first").show();
$(".BIBYearheader").click( function () {
$(this).parent().children(".BIBYear").toggle(300);
return false;
});
$(".bibshowall").click( function () {
$(".BIBYear").show();
});
$(".bibhideall").click( function () {
$(".BIBYear").hide();
$(".BIBYear:first").show();
});
});
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for lektor-bibtex-support-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f5523f2c2bd8203f466495e45f983b6e934f23918188935f2a3e706e0cc173e |
|
MD5 | e0a5013e1663cb3af837a861157a2927 |
|
BLAKE2b-256 | 60e17dde86988618fbd95b5435ccc80976fae0da04d9ad8d3720c504874b390e |
Close
Hashes for lektor_bibtex_support-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1d5f6f741d9f7e129ce5af4303134a6fe060cad6923b9c6b2c0e49a97f5d4c6 |
|
MD5 | 70640bcf961a7b265dcdff30e4b58beb |
|
BLAKE2b-256 | 69c3921d3817773d887fe0f32e2133f74c05506652ce24692f8247a09ca8dfd9 |