getgrav / grav-plugin-langswitcher

Grav LangSwitcher Plugin
https://getgrav.org
MIT License
28 stars 26 forks source link

link href="alternative" being created for pages that don't exist #73

Open angusmcb opened 2 years ago

angusmcb commented 2 years ago

When a page does not have a translation available in a particular language, langswitcher can hide the link from the page.

However, a link to the non-existant page will still be included in the tag in the page header.

sushidave commented 1 year ago

@angusmcb Same issue here. As a quick fix, these two highlighed lines of code temporarily solved the issue for me: grav-langswitcher-hreflang-html-twig Also, I deleted all empty lines to reduce the number of empty lines in the HTML output. It can still be optimized.