Skip to content

Commit

Permalink
Make changes according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
ItayZiv committed Mar 29, 2022
1 parent 8029089 commit 2941072
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sphinxext/opengraph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def get_tags(
):
image_url = first_image["uri"]
ogp_image_alt = first_image.get("alt", None)
else:
first_image = None

if image_url:
# temporarily disable relative image paths with field lists
Expand All @@ -137,7 +139,7 @@ def get_tags(
# Relative image path detected, relative to the source. Make absolute.
if first_image:
root = page_url
else:
else: # ogp_image is set
# ogp_image is defined as being relative to the site root.
# This workaround is to keep that functionality from breaking.
root = config["ogp_site_url"]
Expand Down

0 comments on commit 2941072

Please sign in to comment.