Skip to content

Commit 16a291d

Browse files
author
Emanuele Guidotti
authored
Avoid printing og:description if empty (#42)
1 parent b37e7d0 commit 16a291d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sphinxext/opengraph/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ def get_tags(
9292
tags += make_tag("og:site_name", site_name)
9393

9494
# description tag
95-
tags += make_tag("og:description", description)
95+
if description:
96+
tags += make_tag("og:description", description)
9697

9798
# image tag
9899
# Get basic values from config

0 commit comments

Comments
 (0)