Skip to content

Commit

Permalink
Add option for local HTML files (alshedivat#2245)
Browse files Browse the repository at this point in the history
Add option to link HTML local files from publications page.

---------

Co-authored-by: Jake Nabasny <jake@nabasny.com>
  • Loading branch information
slapcat and slapcat authored Mar 4, 2024
1 parent b451f31 commit 68d1ed3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
8 changes: 8 additions & 0 deletions _bibliography/papers.bib
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
@string{aps = {American Physical Society,}}
@book{einstein1920relativity,
title={Relativity: the Special and General Theory},
author={Einstein, Albert},
year={1920},
publisher={Methuen & Co Ltd},
html={relativity.html}
}

@book{einstein1956investigations,
bibtex_show={true},
title={Investigations on the Theory of the Brownian Movement},
Expand Down
6 changes: 5 additions & 1 deletion _layouts/bib.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@
<a class="bibtex btn btn-sm z-depth-0" role="button">Bib</a>
{% endif %}
{% if entry.html %}
<a href="{{ entry.html }}" class="btn btn-sm z-depth-0" role="button">HTML</a>
{% if entry.html contains '://' %}
<a href="{{ entry.html }}" class="btn btn-sm z-depth-0" role="button">HTML</a>
{% else %}
<a href="{{ entry.html | prepend: '/assets/html/' | relative_url }}" class="btn btn-sm z-depth-0" role="button">HTML</a>
{% endif %}
{% endif %}
{% if entry.pdf %}
{% if entry.pdf contains '://' %}
Expand Down
10 changes: 10 additions & 0 deletions assets/html/relativity.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<body>
<center>
<h2>Relativity: the Special and General Theory</h2>
<h5>Albert Einstein</h5>
<br />
Insert HTML document here.
</center>
</body>
</html>

0 comments on commit 68d1ed3

Please sign in to comment.