Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for local HTML files #2245

Merged
merged 5 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>