{% if USE_OPEN_GRAPH is not defined %} {% set USE_OPEN_GRAPH = True %} {% endif %} {# In Pelican, output_file is very similar to URL but without the first slash / after the hostname #} {% if output_file == 'index.html' %} {% set CANONICAL_HREF = SITEURL ~ "/" %} {% elif output_file.endswith("index.html") %} {% set CANONICAL_HREF = SITEURL ~ "/" ~ output_file.replace('index.html', '') %} {%- if article and article.article_cover_filename %} {%- set LOCAL_ARTICLE_IMAGE = SITEURL ~ "/" ~ article.url ~ article.article_cover_filename %} {%- endif %} {% else %} {% set CANONICAL_HREF = SITEURL ~ "/" ~ output_file %} {% endif %}