Skip to content

Support markdown autolinks with Markdown Render Hooks #6667

@Brixy

Description

@Brixy
Hugo 0.62.0

Given this render-link.html code

<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>

Markdown auto links are currently not supported.

In:

<http:/test.com>

Out:

<a href="http:/test.com">http:/test.com</a>

In (works as expected):

[Test](http:/test.com)

Out:

<a href="http:/test.com" target="_blank" rel="noopener">Test</a>

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions