mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 11:36:23 +00:00
Check link isExternal before adding target="_blank" (#1211)
Fixes #1186 openLinksInNewTab opens ALL links in new tabs. Fixed to reflect documented behavior here: https://quartz.jzhao.xyz/plugins/CrawlLinks
This commit is contained in:
parent
3e14b2b89b
commit
42640bceb5
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
|
|||
}
|
||||
node.properties.className = classes
|
||||
|
||||
if (opts.openLinksInNewTab) {
|
||||
if (isExternal && opts.openLinksInNewTab) {
|
||||
node.properties.target = "_blank"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue