Skip to content

feat: Add target attribute to links in listing templates if provided #12293

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mcanouil
Copy link
Collaborator

@mcanouil mcanouil commented Mar 14, 2025

Enhance the listing templates by conditionally adding a target attribute to links. This allows for better control over link behaviour, enabling users to open links in new tabs if specified. This change improves user experience by providing more flexibility in navigation.

I'm not adding it yet to changelog as it might not be for 1.7, I'll also add a test if this Poc is a good idea.

---
title: "12276"
listing:
  contents:
    - path: posts/post-with-code/index.qmd
      target: _blank
    - path: posts/welcome/index.qmd
  sort: "date desc"
  type: default
  categories: true
  sort-ui: false
  filter-ui: false
page-layout: full
title-block-banner: true
---
Screen.Recording.2025-03-14.at.21.43.08.mov

Originally discussed in:

@mcanouil mcanouil self-assigned this Mar 14, 2025
@mcanouil mcanouil marked this pull request as draft March 14, 2025 21:26
@cscheid cscheid added this to the v1.8 milestone Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants