vercel / nextjs-portfolio-starter

Easily create a portfolio with Next.js and Markdown.
https://demo.vercel.blog
673 stars 263 forks source link

Link & Redirect Problem #11

Open whovivekshukla opened 2 years ago

whovivekshukla commented 2 years ago

Hi, Whenever I try to open the links from the home page. It opens on the same page but I want to open it in a new tab. Also, I want to upload a few of my own files on the web. So I created a new folder and put some files in there, but whenever I am trying to access them, it redirects to 404. Can someone help?

tjgrist commented 2 years ago

@whovivekshukla to open a new tab from a link, you have to set target="_blank" on the anchor tag element. Example:

<a href="https://www.google.com" target="_blank">Open in new tab</a>

For your second question, you have to add the files to the public folder.

whovivekshukla commented 2 years ago

Hi, But the blog is using Markup and I cannot use _Target for opening links in the new tab here. Also Even after uploading the file in the Public folder, it cannot be opened online. Example - https://vshukla.com/public/images/photo.jpg It redirects to 404

On Wed, 30 Mar 2022 at 21:13, TJ Grist @.***> wrote:

@whovivekshukla https://github.com/whovivekshukla to open a new tab from a link, you have to set target="_blank" on the anchor tag element. Example:

Open in new tab

For your second question, you have to add the files to the public folder.

— Reply to this email directly, view it on GitHub https://github.com/vercel/nextjs-portfolio-starter/issues/11#issuecomment-1083307037, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWKC3KUX7BNEJZ5DWG2LVBLVCRZAJANCNFSM5QTOQP2A . You are receiving this because you were mentioned.Message ID: @.***>