Skip to content

Commit cfdeff5

Browse files
asinghvi17pfitzseb
andauthored
use the external field of link to determine new tab or same tab
Co-authored-by: Sebastian Pfitzner <[email protected]>
1 parent e8e8f8e commit cfdeff5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/renderers.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ function render(c::Link, doc, thispage, prettyurls)
4040
# class nav-link nav-item makes the formatting correct
4141
# target="_blank" opens the link in a new tab
4242
# TODO: add "external link" icon after, either chain or arrow exiting box.
43-
# TODO: allow internal links
4443
return @htl """
45-
<a href=$(c.link) class="nav-link nav-item" target="_blank">$(c.text)</a>
44+
<a href=$(c.link) class="nav-link nav-item" target=$(c.isexternal ? "_blank" : "_self")>$(c.text)</a>
4645
"""
4746
end
4847

0 commit comments

Comments
 (0)