Skip to content

Commit 3bdc3fd

Browse files
Martina Stadler KurtzMartina Stadler Kurtz
authored andcommitted
Testing bibere with gh pages
1 parent 61d2157 commit 3bdc3fd

File tree

8 files changed

+255
-1
lines changed

8 files changed

+255
-1
lines changed

_includes/bibere/bibtex-all.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
% --------------------------------------------------------------
2+
% Generated by bibere at {{ site.time | date: '%l:%M %P %Z on %b %-d, %Y' -}}.
3+
% --------------------------------------------------------------
4+
5+
{%- assign minYear = include.minYear | plus: 0 -%}
6+
<!-- Create a list of papers filtered by flags -->
7+
{%- assign filtered = '' | split: '' -%}
8+
{%- for p in site.data.bibere.papers -%}
9+
{%- assign numyear = p[1].year | to_integer -%}
10+
{%- if numyear >= minYear -%}
11+
{%- if include.filterAuthor %}
12+
{%- if p[1].authors contains include.filterAuthor -%}
13+
{%- assign filtered = filtered | push: p -%}
14+
{%- endif -%}
15+
{%- else -%}
16+
{%- assign filtered = filtered | push: p -%}
17+
{%- endif -%}
18+
{%- endif -%}
19+
{%- endfor -%}
20+
<!-- Group filtered ones by year, sorted -->
21+
{% assign years = filtered | group_by_exp: "p", "p[1].year" | sort: "name" | reverse %}
22+
23+
{% capture newLine %}
24+
{% endcapture %}
25+
26+
{%- for year in years -%}
27+
{%- assign numyear = year.name | strip | plus: 0 -%}
28+
{%- if numyear >= minYear -%}
29+
{%- for p in year.items -%}
30+
{%- assign pid = p[0] -%}
31+
{{ newLine }}
32+
{%- include bibere/bibtex.html pid=pid mainAuthor=include.mainAuthor -%}
33+
{{ newLine }}
34+
{%- endfor -%}
35+
{%- endif -%}
36+
{%- endfor -%}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{%- case include.type -%}
2+
{%- when "Conference" -%} inproceedings
3+
{%- when "Workshop" -%} inproceedings
4+
{%- when "Demo" -%} inproceedings
5+
{%- when "Invited" -%} inproceedings
6+
{%- when "TechReport" -%} techreport
7+
{%- when "Patent" -%} techreport
8+
{%- when "Thesis" -%} phdthesis
9+
{%- when "Journal" -%} article
10+
{%- when "Chapter" -%} incollection
11+
{%- when "Online" -%} misc
12+
{%- else -%} misc
13+
{%- endcase -%}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{%- case include.type -%}
2+
{%- when "Conference" -%} booktitle
3+
{%- when "Workshop" -%} booktitle
4+
{%- when "Demo" -%} booktitle
5+
{%- when "Invited" -%} booktitle
6+
{%- when "TechReport" -%} institution
7+
{%- when "Patent" -%} institution
8+
{%- when "Thesis" -%} school
9+
{%- when "Journal" -%} journal
10+
{%- when "Chapter" -%} booktitle
11+
{%- when "Online" -%} editor
12+
{%- else -%} series
13+
{%- endcase -%}

_includes/bibere/bibtex.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{%- assign paper = site.data.bibere.papers[include.pid] -%}
2+
{%- if paper -%}
3+
@{%- include bibere/bibtex-entry-type.html type=paper.type -%} { {{-include.pid-}},
4+
author = {
5+
{%- for a in paper.authors -%}
6+
{%- assign author = site.data.bibere.authors[a] -%}
7+
{%- if author -%}
8+
{%- if a == include.mainAuthor -%}
9+
{\\textbf{ {{-author.name.first-}}}} {\\textbf{ {{-author.name.last-}} }}
10+
{%- else -%}
11+
{{ author.name.first }} {{ author.name.last }}
12+
{%- endif -%}
13+
{%- else -%}
14+
{{ a }}
15+
{%- endif -%}
16+
{% unless forloop.last == true %} and {% endunless %}
17+
{%- endfor -%}
18+
},
19+
title = { { {{- paper.title | strip_newlines -}} } },
20+
{% include bibere/bibtex-venue-title.html type=paper.type %} = {
21+
{%- assign venue = site.data.bibere.venues[paper.venue] -%}
22+
{%- if venue -%}
23+
{{ venue.name }}
24+
{%- else -%}
25+
{{ paper.venue }}
26+
{%- endif -%}
27+
},{% for field in paper.bibtex_fields %}
28+
{{ field[0] }} = { {{- field[1] -}} },{% endfor %}{% if paper.doi %}
29+
doi = { {{- paper.doi -}} },{% endif %}{% if paper.pages %}
30+
pages = { {{- paper.pages -}} },{% endif %}
31+
year = { {{- paper.year -}} }
32+
}
33+
{%- endif -%}

_includes/bibere/byyear.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{% assign minYear = include.minYear | to_integer %}
2+
<!-- Create a list of papers filtered by flags -->
3+
{% assign filtered = '' | split: '' %}
4+
{%- for p in site.data.bibere.papers -%}
5+
{%- assign numyear = p[1].year | to_integer -%}
6+
{%- if numyear >= minYear -%}
7+
{%- if include.filterAuthor %}
8+
{%- if p[1].authors contains include.filterAuthor -%}
9+
{% assign filtered = filtered | push: p %}
10+
{%- endif -%}
11+
{%- else -%}
12+
{% assign filtered = filtered | push: p %}
13+
{%- endif -%}
14+
{%- endif -%}
15+
{%- endfor -%}
16+
<!-- Group filtered ones by year, sorted -->
17+
{% assign years = filtered | group_by_exp: "p",
18+
"p[1].year" | sort: "name" | reverse %}
19+
20+
<div>
21+
Publications (grouped by year):
22+
{%- for year in years -%}
23+
{%- if forloop.first == false -%}
24+
,
25+
{% endif %}
26+
<a href="#{{ year.name }}">{{ year.name }}</a>
27+
{%- endfor -%}
28+
.
29+
<hr>
30+
</div>
31+
<!-- For each year, sorted by type (alphabetical), then sort_weight -->
32+
{% for year in years %}
33+
<span id="{{ year.name }}" class="yearGroup">{{ year.name }}</span>
34+
<ul class="papers">
35+
{% assign types = year.items | group_by_exp: "p", "p[1].type" | sort: "name" %}
36+
{% for type in types %}
37+
{% assign weights = type.items | group_by_exp: "p", "p[1].sort_weight" | sort: "name" | reverse %}
38+
{% for weight in weights %}
39+
{% for p in weight.items %}
40+
{%- assign pid = p[0] -%}
41+
{% include bibere/paper.html pid=pid mainAuthor=include.mainAuthor %}
42+
{% endfor %}
43+
{% endfor %}
44+
{% endfor %}
45+
</ul>
46+
{% endfor %}

_includes/bibere/paper.html

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{%- assign paper = site.data.bibere.papers[include.pid] -%}
2+
{%- if paper -%}
3+
{%- capture clean_id -%}
4+
{{ include.pid | replace: ":", "_" | replace: "-", "_" }}
5+
{%- endcapture -%}
6+
<li id="{{ clean_id }}">
7+
<!-- Author -->
8+
{%- for a in paper.authors -%}
9+
{%- assign author = site.data.bibere.authors[a] -%}
10+
{%- if a == include.mainAuthor -%}
11+
{%- assign authorClass = "mainAuthor" -%}
12+
{%- else -%}
13+
{%- assign authorClass = "author" -%}
14+
{%- endif -%}
15+
<span class="{{ authorClass }}">
16+
{%- if author -%}
17+
{%- if author.website -%}
18+
<a href="{{ author.website }}">{{ author.name.first }} {{ author.name.last }}</a>
19+
{%- else -%}
20+
{{ author.name.first }} {{ author.name.last }}
21+
{%- endif -%}
22+
{%- else -%}
23+
{{ a }}
24+
{%- endif -%}
25+
</span>
26+
{%- if forloop.last == true -%}
27+
.
28+
{%- else -%}
29+
,&nbsp;
30+
{%- endif -%}
31+
{%- endfor -%}
32+
<!-- Title -->
33+
{%- assign clean_title = paper.title | replace: "}", '' | strip_newlines -%}
34+
<span class="title">{{ clean_title | replace: "{", '' }}.</span>
35+
<!-- Venue -->
36+
<span class="venue">
37+
{%- assign venue = site.data.bibere.venues[paper.venue] -%}
38+
{%- if paper.type == "Thesis" -%}PhD Thesis,&nbsp;{%- endif -%}
39+
{%- if paper.type == "TechReport" -%}Technical Report,&nbsp;{%- endif -%}
40+
{%- if venue -%}
41+
{{ venue.name }}
42+
{%- else -%}
43+
{{ paper.venue }}
44+
{%- endif -%}.
45+
</span>
46+
<!-- Year -->
47+
<span class="year">{{ paper.year }}</span>
48+
<!-- Tag -->
49+
<span class="tag_{{ paper.type }} tag label label-default">{{ paper.type }}</span>
50+
{%- for tag in paper.extraTags -%}
51+
<span class="tag_{{ tag }} tag label label-default">{{ tag }}</span>
52+
{%- endfor -%}
53+
<br/>
54+
<!-- Notes -->
55+
{%- if paper.emphasis -%}
56+
<span class="emphasisNote">{{ paper.emphasis }}</span><br/>
57+
{%- endif -%}
58+
{%- if paper.note -%}
59+
<span class="note">{{ paper.note }}</span><br/>
60+
{%- endif -%}
61+
<!-- Links -->
62+
[
63+
{%- if paper.links -%}
64+
{%- for item in paper.links -%}
65+
{% assign link_first_char = item.link | slice:0,1 %}
66+
{%- if link_first_char == "/" and site.bibere.file_base_url -%}
67+
&nbsp;<a href="{{ site.bibere.file_base_url }}{{item.link}}">{{item.name}}</a>,
68+
{%- else -%}
69+
&nbsp;<a href="{{item.link}}">{{item.name}}</a>,
70+
{%- endif -%}
71+
{%- endfor -%}
72+
{%- endif -%}
73+
<!-- Abstract -->
74+
{%- if paper.abstract -%}
75+
&nbsp;<a class="collapse-clicker" onclick="$('#{{ clean_id }}_abstract').slideToggle(200)">Abstract</a>,
76+
{%- endif -%}
77+
<!-- BibTex -->
78+
<a class="collapse-clicker" onclick="$('#{{ clean_id }}_bibtex').slideToggle(200)">BibTex</a> ]
79+
{%- if paper.abstract -%}
80+
<div class="collapse" id="{{ clean_id }}_abstract">
81+
<div class="panel panel-primary">
82+
<div class="panel-body details-panel">
83+
{{- paper.abstract -}}
84+
</div>
85+
</div>
86+
</div>
87+
{%- endif -%}
88+
<div class="collapse" id="{{ clean_id }}_bibtex">
89+
<div class="panel panel-info">
90+
<pre class="panel-body details-panel">
91+
{%- include bibere/bibtex.html pid=include.pid -%}
92+
</pre>
93+
</div>
94+
</div>
95+
</li>
96+
{%- else -%}
97+
<p class="text-danger">Paper with id {{include.pid}} not found!</p>
98+
{{ error.standard_error }}
99+
{%- endif -%}

_includes/head.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<head>
2+
<meta charset="utf-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<meta name="viewport" content="width=device-width, initial-scale=1">
5+
{%- seo -%}
6+
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
7+
{%- feed_meta -%}
8+
{%- if jekyll.environment == 'production' and site.google_analytics -%}
9+
{%- include google-analytics.html -%}
10+
{%- endif -%}
11+
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
12+
<script>
13+
</script>
14+
</head>

publications.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
<a href="{{ site.base }}/bib/pubs.bib">Download BibTeX.</a>
77
</p>
88

9-
{% include pubs.html %}
9+
{% include bibere/byyear.html %}

0 commit comments

Comments
 (0)