diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-05-17 21:04:29 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-05-17 21:04:29 -0700 |
commit | f767a344c1ed7722b79710c6f3c61d5802f78860 (patch) | |
tree | 8a4779f4c83687965a80127316274967f14f4685 /fatcat_scholar/templates/work.html | |
parent | f4ffc6863ec7d08a195cb8cb5370a153d093454e (diff) | |
download | fatcat-scholar-f767a344c1ed7722b79710c6f3c61d5802f78860.tar.gz fatcat-scholar-f767a344c1ed7722b79710c6f3c61d5802f78860.zip |
iterate on PDF redirect links
Diffstat (limited to 'fatcat_scholar/templates/work.html')
-rw-r--r-- | fatcat_scholar/templates/work.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fatcat_scholar/templates/work.html b/fatcat_scholar/templates/work.html index 611576b..67c87e0 100644 --- a/fatcat_scholar/templates/work.html +++ b/fatcat_scholar/templates/work.html @@ -30,10 +30,10 @@ {% if work.biblio.doi %} <meta name="citation_doi" content="{{ work.biblio.doi }}"> {% endif %} -{% if work.fulltext.access_url and work.biblio.release_ident == work.fulltext.release_ident and work.fulltext.access_type in ['wayback', 'ia_file'] and work.fulltext.file_mimetype == "application/pdf" and work.fulltext.file_sha1 %} - <!-- PDF access redirect URL, as requested by, eg, scholar.google.com --> - <meta name="citation_pdf_url" content="https://scholar.archive.org/access-redirect/{{ work.fulltext.file_sha1 }}.pdf"> - <!-- Multiple URLs allowed? <meta name="citation_pdf_url" content="{{ work.fulltext.access_url }}"> --> +{% if work.fulltext.access_url and work.biblio.release_ident == work.fulltext.release_ident and work.fulltext.access_type in ['wayback', 'ia_file'] and work.fulltext.file_mimetype in ["application/pdf", None] and work.fulltext.file_sha1 %} + <!-- single PDF access redirect URL --> + <meta name="citation_pdf_url" content="{{ make_access_redirect_url(work.fulltext.access_type, work.fulltext.access_url) }}"> + <!-- direct URL: {{ work.fulltext.access_url | safe }} --> {% endif %} {% endblock %} |