Skip to content

Commit

Permalink
Trimmed a bit too many whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaoming committed Jan 11, 2023
1 parent 9083bfc commit df87a40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sphinx_rtd_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
Workaround for: https://github.com/sphinx-doc/sphinx/issues/9730
Once a fix is released in Sphinx, put an upper bound on the Sphinx version for the workaround
-#}
{%- if builder == 'dirhtml' and pageurl.endswith('.html') -%}
{#- This expression trims away .html and adds a / -#}
{%- if builder == 'dirhtml' and pageurl.endswith('.html') %}
{#- This expression trims away .html and adds a / #}
<link rel="canonical" href="{{ (pageurl|e)[:-5] }}/" />
{%- else -%}
{%- else %}
<link rel="canonical" href="{{ pageurl|e }}" />
{%- endif -%}
{%- endif -%}
Expand Down

0 comments on commit df87a40

Please sign in to comment.