kiuKisas / elderjs-plugin-i18n

i18n support for your Elder.js powered website
MIT License
9 stars 1 forks source link

Add `i18nHref` shortcode #6

Closed Stijn-B closed 2 years ago

Stijn-B commented 2 years ago

The i18nHref shortcode is a replacement for the <a/> html tag.

It checks to which request corresponds to the given href and then uses the allPermalinks helper to determine the different hrefs for all locales. An <a/> tag is returned with the href corresponding to the locale of the page it's on.