Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link-external-newwindow: true not respected by default listing #9468

Open
mcanouil opened this issue Apr 24, 2024 · 6 comments · May be fixed by #9469
Open

link-external-newwindow: true not respected by default listing #9468

mcanouil opened this issue Apr 24, 2024 · 6 comments · May be fixed by #9469
Assignees
Labels
bug Something isn't working listings
Milestone

Comments

@mcanouil
Copy link
Collaborator

mcanouil commented Apr 24, 2024

Listings type grid/table do respect link-external-newwindow but not the default type.

  1. quarto create project blog demo Demo
  2. Replace content of index.qmd
---
title: "Demo"
link-external-newwindow: true
listing:
  contents:
    - path: https://www.nature.com/articles/d41586-024-00692-7
      title: "China–US climate collaboration concerns as Xie and Kerry step down"
      author: Smriti Mallapaty
      description: "Gang's quote on the importance to continue the research exchange and colloboration 'If the river freezes over, water will still flow underneath.'"
      date: "2024-03-12"
      categories: [Nature]
  sort: "date desc"
  type: default
  categories: true
  sort-ui: false
  filter-ui: false
page-layout: full
title-block-banner: true
---
@mcanouil mcanouil added bug Something isn't working listings labels Apr 24, 2024
@mcanouil mcanouil added this to the v1.5 milestone Apr 24, 2024
@mcanouil mcanouil changed the title link-external-newwindow: true not respected by default listing (table/grid do respect it) link-external-newwindow: true not respected by default listing Apr 24, 2024
@cscheid cscheid self-assigned this Apr 24, 2024
@mcanouil mcanouil self-assigned this Apr 24, 2024
mcanouil added a commit to mcanouil/quarto-cli that referenced this issue Apr 24, 2024
@mcanouil
Copy link
Collaborator Author

mcanouil commented Apr 27, 2024

Could you share code rather than a screenshot?
And how did you test the "fix"?

@drganghe
Copy link

drganghe commented Apr 28, 2024

I replace the item-default.ejs.md file with the file you committed (equivalent to deleting the .no-external class in Lines 42, 53, 54, 62, 67).
I then quarto preview my project, the media.qmd works as expected.
drganghe/drganghe.github.io@9121ae2#diff-3733d6c853ca24e1268a6d48a139012d0c29197999f9cae7df0f60778c5e9abb
However, it breaks the post.qmd file render results:
drganghe/drganghe.github.io@9121ae2#diff-b1b970d58cda05f52baf4e18d7815dcc9c1e465419034abd677dff20afe144ac
I change back the item-default.ejs file and revert my commit.
I hope this helps you investigate more.

@mcanouil
Copy link
Collaborator Author

Providing a custom EJS file means you are taking control of the layout and everything.
It's unrelated to the fix.

If you want to try the fix, you need to fork/clone the branch, and follow the readme to build a development version of QUarto.

I tried your repository (you have a lot of citeproc warnings and you are using a shortcode coming from an extension your don't have "ai"):

Screen.Recording.2024-04-28.at.13.58.47.mov

@drganghe
Copy link

Thank you for the clarification. I will try to clone the whole branch to use it, or I'll just wait for the new version.
My extensions are ignored in the repository, but thank you for the note.
citeproc warnings are from the embedded Tweet/Linkedin handler. I hope Quarto can recognize those and do not generate a warning, but those does not bother me and the rendered results look good.

@mcanouil
Copy link
Collaborator Author

mcanouil commented Apr 28, 2024

Quarto won't but there are extensions to embed tweets (look for "social" on https://m.canouil.dev/quarto-extensions/extensions.html or https://quarto.org/docs/extensions/).
And if you are using HTML to embed tweets, then you should use raw blocks, see https://quarto.org/docs/authoring/markdown-basics.html#raw-content.

@drganghe
Copy link

Thank you so much @mcanouil. It's cool to know there are options, I will use the raw blocks. I always learn something new from conversations with you. Thanks!

@cscheid cscheid modified the milestones: v1.5, v1.6 Jun 20, 2024
@cscheid cscheid modified the milestones: v1.6, v1.7 Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working listings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants