Skip to content

Commit

Permalink
only show tags if config set
Browse files Browse the repository at this point in the history
  • Loading branch information
OllyButters committed Aug 28, 2024
1 parent 195c51e commit 6ca6066
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions source/web_pages/common_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,16 @@ def draw_paper(this_paper, nav_path="./"):
html += '-'

# Tags
try:
if len(this_paper['clean']['zotero_tags']) > 0:
html += '<br/>Tags: '
html_tags = []
for this_tag in this_paper['clean']['zotero_tags']:
html_tags.append('<a href="' + nav_path + 'tags/' + this_tag['tag'] + '/index.html">' + this_tag['tag'] + '</a>')
html += '&nbsp;|&nbsp;'.join(html_tags)
except Exception:
pass
if config.WEB_PAGE_SHOW_ZOTERO_TAGS:
try:
if len(this_paper['clean']['zotero_tags']) > 0:
html += '<br/>Tags: '
html_tags = []
for this_tag in this_paper['clean']['zotero_tags']:
html_tags.append('<a href="' + nav_path + 'tags/' + this_tag['tag'] + '/index.html">' + this_tag['tag'] + '</a>')
html += '&nbsp;|&nbsp;'.join(html_tags)
except Exception:
pass

html += '</div>'

Expand Down

0 comments on commit 6ca6066

Please sign in to comment.