Replies: 3 comments 10 replies
-
Be aware that this (i.e., cross-posting) is considered by many on the internet as a "bad practice" to say the least as it is not respectful of the time spent on the platforms by users trying to help as they might be spending time addressing an issue already solved elsewhere. Also, this makes your current post incomplete. So, I'm going to request two things to help future readers:
Thank you for your understanding. Reminder that the documentation on listings are: |
Beta Was this translation helpful? Give feedback.
-
I don't think we have a configuration for that. I see two features you could leverage
Last idea is a workaround:
Hope it helps |
Beta Was this translation helpful? Give feedback.
-
Meanwhile I have created a solution using lua filter: in RStudio go and create a new quarto blog.
add these two files to the posts/post-with-code folder: b.) reveal-header.lua containing this code (simple a text file with ending .lua instead of .txt):
where the StackOverflow page is only the placeholder for the index site of your online blog. |
Beta Was this translation helpful? Give feedback.
-
Update:
Thanks to @mcanouil for clarification. I added the remaining information to be complete.
Description
I asked this on stackoverflow https://stackoverflow.com/questions/79502269/how-to-open-listing-items-in-a-new-tab-when-using-reveal-js-slide-shows.
I'm working on a Quarto blog where each post consists of a reveal.js slide show. My index.qmd file uses the listing: feature to automatically list all posts inside the posts/ folder.
However, when I open a reveal.js slide show, I cannot easily return to the main index page to navigate to another slide show. This issue only occurs with reveal.js presentations - if the posts were regular articles, I could simply use the browser's back button or site navigation.
To solve this, I want each listed item in index.qmd to open in a new tab (i.e., add target="_blank" to each link). This way, the index page remains open, and I can easily switch between presentations.
The newly added information:
To solve this, I want each listed item in
index.qmd
to open in a new tab (i.e., addtarget="_blank"
to each link). This way, the index page remains open, and I can easily switch between presentations.In
index.qmd
, I attempted:But this gives an error:
Is there a way to modify Quarto's listing behavior to make all links open in a new tab?
Alternatively, is there a way to customize the output format of listing: to insert
target="_blank"
dynamically?Additional info:
I'm using Quarto's default blog setup with listing: in
index.qmd
.This issue only happens with reveal.js slide shows.
For regular posts, I can return to the index page without problems.
I want a dynamic solution instead of manually writing links for each post.
I can't provide a minimal reproducible example because this requires a full Quarto project setup.
Beta Was this translation helpful? Give feedback.
All reactions