I’ve been trying to use Markdown-style links with Hugo. I have a layouts/_default/_markup/render-link.html and a layouts/_default/_markup/render-image.html.
Consider the page at /notes/asp.net/fundamentals/services-and-dependency-injection/.
On that page, the second hyperlink attempts to link to:
/notes/_net/dependency-injection/overview.md
The Markdown for that hyperlink is…
[Dependency Injection in .NET](../../_net/dependency-injection/overview)
…which instead links to:
/notes/asp.net/_net/dependency-injection/overview
If I change the Markdown to…
[Dependency Injection in .NET](/notes/_net/dependency-injection/overview)
…it works. However, this is unintuitive because /notes is not the root of the repo. Below /notes is /content, so intuitively it would be /content/notes/...
Of course, links to documents not below the /notes/asp.net/ level work fine.
I don’t understand Hugo Markdown render hooks well enough to fix this. Does anyone have any advice?