Skip to content

Link to md from other language #1281

Description

@d-oit

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions