Proper way to target="_blank"
2 Replies
Hi @flomero. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The knowledge sources do not explicitly document the recommended way to add
There is no documented, supported way in the provided knowledge sources to add
target="_blank" to Markdown links in Nuxt Content .md files. There is no mention of Markdown link syntax with {target="_blank"} or how to handle escaping issues with ESLint or other linters in the provided documentation.
However, the Nuxt UI and NuxtLink components do support the target="_blank" attribute when used in Vue components or with their respective UI components, as shown in examples for components like UUser, UBlogPost, and UPageAnchors—but these are Vue templates, not Markdown files. For example:
User component link props
For Markdown files, the knowledge sources do not provide a solution or workaround for the escaping issue you described with [title](url){target="_blank"} and ESLint. If you need to ensure external links open in a new tab and want to avoid linting issues, you may need to consult the Nuxt Content documentation or community for the latest best practices, as this is not covered in the provided sources.
Summary:There is no documented, supported way in the provided knowledge sources to add
target="_blank" to Markdown links in Nuxt Content files or to resolve the escaping issue with linters. The sources only show how to use target="_blank" in Vue components and Nuxt UI components, not in Markdown content.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@333278111326273537> Kapa.ai is still learning and improving, please let me know how I did by reacting below.