untra / polyglot

:abc: Multilingual and i18n support tool for Jekyll Blogs
https://polyglot.untra.io
MIT License
394 stars 58 forks source link

Add other lang permalinks to doc data #185

Closed antoniovazquezblanco closed 6 months ago

antoniovazquezblanco commented 8 months ago

🔤 Polyglot PR

Description here

Adding other lang permalinks to a page may allow the user to generate direct links to translations without redirects. I think that SEO focused sites may benefit from this! :D

Let me know what you think and if how could I improve this!

Type of change

Checklists

untra commented 8 months ago

This will need some readme words re: permalink_lang frontmatter and how that should be used. And add a test for this, please!

antoniovazquezblanco commented 8 months ago

I have done a little bit of doc and testing. Feedback on how to improve is welcomed :D

untra commented 8 months ago

Good docs and good test!

I'm seeing the appeal of this, but I also wonder if updating the existing {{ I18n_Headers }} plugin to better support the permalink_lang and recognize when in a page_id is set.

https://github.com/untra/polyglot/pull/185/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R79-R82

this logic is remarkably similar to https://github.com/untra/polyglot/blob/master/lib/jekyll/polyglot/liquid/tags/i18n_headers.rb#L19-L25 And I'm thinking this tag needs an update with this work.

untra commented 8 months ago

btw you don't need to update that liquid tag as part of this PR, but also I'm not looking to cut another polyglot release too soon. These changes look good though, thanks for your help @antoniovazquezblanco !

antoniovazquezblanco commented 8 months ago

I will update the I18n_Headers tag 👍

The permalink_lang property is still useful for navigation in my case...

antoniovazquezblanco commented 8 months ago

Done! :D

antoniovazquezblanco commented 6 months ago

Happy new year!

Now that it is public, I would like to tell you that this functionality, although not released is in use at https://github.com/TarlogicSecurity/BSAM.

:)

untra commented 6 months ago

glad to see it! and great use of rich text and the language switcher on the website! I'm glad this plugin can be so helpful to your multi-language presence. And Thanks again for this contribution!

I believe the changes for 1.7.0 have soaked enough. Approved. 1.7.1 in progress.