Show note links should open in a new tab
In order to preserve the users window in case they are playing a podcast episode show note links (or perhaps all external links?) should open in a new tab.
This'll be interesting...I think the only way to ensure all external links open to a new window we'd have to do some javascript to add the target="_blank" for all links on the page :thinking:
Because particularly the shownotes, we're not able to access the links in that since they're hugo content (i.e. the MD part of the .md files under content/)
Only external links...
ya, we'll have to do an if statement as well to check if they're external.
i.e. everything under "Episode Links" for this episode: https://new.jupiterbroadcasting.com/show/office-hours/1/
Is defined here: https://github.com/JupiterBroadcasting/jupiterbroadcasting.com/blob/fae40bf883007e391d97babb34dffe6a5e0256a5/content/show/office-hours/0001.md?plain=1#L55-L59
Do the show note links end up in a specific div or something? Could that be used?
not currently, but we could add an id="content" or something. we'd still have to use JS to modify it all.
BTW, I don't think this is required for the JB 1.0 milestone. If we're just getting it launched (MVP) I think this could be bumped to 2.0 and if someone has time to work on it then that'd be awesome.
Or you could put something like
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
in themes/jb/layouts/_default/_markup/render-link.html
To get
<a href="https://daringfireball.net/2019/06/the_talk_show_live_from_wwdc_2019" title="The Talk Show Live From WWDC 2019" target="_blank" rel="noopener">The Talk Show Live From WWDC 2019</a>
generated.