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

Link to md from other language #1281

Open
d-oit opened this issue Nov 5, 2024 · 0 comments
Open

Link to md from other language #1281

d-oit opened this issue Nov 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@d-oit
Copy link
Contributor

d-oit commented Nov 5, 2024

Problem or enhancement idea

Markdown content only exists in as content in en

create a link in a de content markdown to a en markdown - tried all https://gethinode.com/docs/components/link/#examples

{{< link "../content/blog/en/2024-05-21-uninstall-mobile-devices-task-in-windows-11.md" >}}Internal link with full path{{< /link >}}

Hugo build:

ERROR Cannot find page or asset: '../content/blog/en/2024-05-21-uninstall-mobile-devices-task-in-windows-11.md'

Hint: I do not want to create 2024-05-21-uninstall-mobile-devices-task-in-windows-11.md as de content.

Proposed solution

Use link in the same way as Hugo relrefworks:

[TestMarkdown]({{% relref path="2024-05-21-uninstall-mobile-devices-task-in-windows-11.md" lang="en" %}})

Additional context

{{< refLink ref="2024-05-21-uninstall-mobile-devices-task-in-windows-11.md" lang="en" text="button text" showButton="true" color="info" >}}

{{< link "free-basketball-live-streams.md" >}}Internal link with full path only working inside lang folder{{< /link >}}

{{< refLink ref="2024-05-21-uninstall-mobile-devices-task-in-windows-11.md" lang="en" text="link text" >}}

My full solution, use it as button or link:

https://raw.githubusercontent.com/d-oit/d-oit.github.io/refs/heads/main/layouts/shortcodes/refLink.html

@d-oit d-oit added the enhancement New feature or request label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant