Skip to content

Commit 6ca6066

Browse files
committed
only show tags if config set
1 parent 195c51e commit 6ca6066

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

source/web_pages/common_html.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,16 @@ def draw_paper(this_paper, nav_path="./"):
100100
html += '-'
101101

102102
# Tags
103-
try:
104-
if len(this_paper['clean']['zotero_tags']) > 0:
105-
html += '<br/>Tags: '
106-
html_tags = []
107-
for this_tag in this_paper['clean']['zotero_tags']:
108-
html_tags.append('<a href="' + nav_path + 'tags/' + this_tag['tag'] + '/index.html">' + this_tag['tag'] + '</a>')
109-
html += '&nbsp;|&nbsp;'.join(html_tags)
110-
except Exception:
111-
pass
103+
if config.WEB_PAGE_SHOW_ZOTERO_TAGS:
104+
try:
105+
if len(this_paper['clean']['zotero_tags']) > 0:
106+
html += '<br/>Tags: '
107+
html_tags = []
108+
for this_tag in this_paper['clean']['zotero_tags']:
109+
html_tags.append('<a href="' + nav_path + 'tags/' + this_tag['tag'] + '/index.html">' + this_tag['tag'] + '</a>')
110+
html += '&nbsp;|&nbsp;'.join(html_tags)
111+
except Exception:
112+
pass
112113

113114
html += '</div>'
114115

0 commit comments

Comments
 (0)