Skip to content

davidwilby/openlinksinnewpage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openlinksinnewpage Extension For Quarto

With the openlinksinnewpage filter hyperlinks automatically open in a new page, similarly to adding {target="_blank"} to your markdown hyperlinks.

Packaged up as an extension following suggestion by @cscheid on a discussion here.

This provides an alternative to using the following syntax

[quarto](https://quarto.org/){target="_blank"}

if you want all links to be opened in a new page.

Installing

quarto add davidwilby/openlinksinnewpage

This will install the extension under the _extensions subdirectory. If you're using version control, you will want to check in this directory.

Using

Carry on as usual! Ensure that the following is in your yaml frontmatter:

filters:
    - openlinksinnewpage

All the links in your quarto document or presentation will open in a new page or tab.

Limitations

Currently not possible to override if you want a single link to open with a target of _self for instance. Contributions welcome!

Example

Here is the source code for a minimal example: example.qmd.