Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidwilby/openlinksinnewpage
Quarto extension to open all links in new pages
https://github.com/davidwilby/openlinksinnewpage
hyperlinks quarto quarto-extension reveal-js
Last synced: about 1 month ago
JSON representation
Quarto extension to open all links in new pages
- Host: GitHub
- URL: https://github.com/davidwilby/openlinksinnewpage
- Owner: davidwilby
- License: mit
- Created: 2023-12-05T11:44:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-09T18:22:53.000Z (about 1 year ago)
- Last Synced: 2023-12-09T19:31:19.882Z (about 1 year ago)
- Topics: hyperlinks, quarto, quarto-extension, reveal-js
- Language: Lua
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# openlinksinnewpage Extension For Quarto
With the `openlinksinnewpage` filter [hyperlinks](https://quarto.org/) 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](https://github.com/quarto-dev/quarto-cli/discussions/3169).
This provides an alternative to using the following syntax
```md
[quarto](https://quarto.org/){target="_blank"}
```if you want all links to be opened in a new page.
## Installing
```bash
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:
```yaml
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](example.qmd).