Skip to content

Commit

Permalink
default to base_url when $page.canonical is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
mohaidoss authored Dec 7, 2024
1 parent db3d7af commit d1272ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/_partials/head.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
{/if}
{if $page.canonical}
<link rel="canonical" href="{$page.canonical}">
{else}
<link rel="canonical" href="{$urls.base_url}">
{/if}
{block name='head_hreflang'}
{foreach from=$urls.alternative_langs item=pageUrl key=code}
Expand Down

0 comments on commit d1272ff

Please sign in to comment.