We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e783b33 + af8e68b commit 1e540e1Copy full SHA for 1e540e1
1 file changed
vfbterms.py
@@ -497,11 +497,14 @@ def generate_page(term_data):
497
url_slug = get_term_url(name, term_id)
498
499
# Tags for front matter
500
- tags_csv = ",".join(tags)
+ # Build a clean list and drop empties, otherwise a term with no Tags
501
+ # yields a leading comma (e.g. "[,VFB]") which is invalid YAML flow syntax
502
+ tag_list = list(tags)
503
if "_" in term_id:
- tags_csv += "," + term_id.split("_")[0]
504
+ tag_list.append(term_id.split("_")[0])
505
elif term_id.startswith("FB"):
- tags_csv += "," + term_id[0:4]
506
+ tag_list.append(term_id[0:4])
507
+ tags_csv = ",".join(t for t in tag_list if t)
508
509
# Thumbnails
510
thumbnails = get_thumbnails(term_data)
0 commit comments