Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rel-lang-url #160

Open
wants to merge 1 commit into
base: main-uk-wip
Choose a base branch
from
Open

Rel-lang-url #160

wants to merge 1 commit into from

Conversation

Andygol
Copy link
Owner

@Andygol Andygol commented May 12, 2024

Implemented a link decorator feature that automatically converts links within documents to localized ones. This enhancement eliminates the need for manually appending language codes to the links.

Copy link

netlify bot commented May 12, 2024

Deploy Preview for andygol-k8s ready!

Name Link
🔨 Latest commit a6bc589
🔍 Latest deploy log https://app.netlify.com/sites/andygol-k8s/deploys/6640d21e620b660008d6a9c3
😎 Deploy Preview https://deploy-preview-160--andygol-k8s.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Owner Author

@Andygol Andygol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Andygol
Copy link
Owner Author

Andygol commented May 23, 2024

📝 Note

@Andygol
Copy link
Owner Author

Andygol commented Jun 22, 2024

There is a big question: how to check the presence of a localized document using the capabilities of Hugo, for further use in the link decorator (render-link.html)?

graph LR;

src_link("Link in a doc…")


src_link-->none_localized_link("… is not localized\n starts with `/docs/…`")-->
check_for_localization{"if a localized\ndoc exists"}-- "yes, it is" -->add_lng_prefix("Add lang-code\nprefix to the link")

src_link-->indoc_link("… is in the same doc\nstarts with`#` symbol")
src_link-->already_localized_link("… is localized already\n starts with\n`/lang-code/docs/…`")
src_link-->ext_link("…is an external link\nstarts with protocol\n [https:|mailto:|…] ")

ext_link & already_localized_link & indoc_link ---> asis("Keep it as is")
check_for_localization-- "no, it isn't" -->asis
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant