HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.19k stars 2.9k forks source link

Click the link will change the original website and open a new tab at the same time #1379

Closed guochengqian closed 5 years ago

guochengqian commented 5 years ago

Hello.

Thanks very much for the hugo-academic theme. However, I find a common problem for my friend and me. When we click the link inside our website, the original website will change and new tab is open at the same time. For example, my website is gcqian.com, when I click the link www.google.com inside my website, gcqian.com will change to www.google.com and a new tab www.google.com will open as well.

We don't know how to solve this. Can you give us any hint?

gcushen commented 5 years ago

Hugo has some options to control this - see hrefTargetBlank in config.toml. Hugo's documentation explains this and you can also search Hugo forums to learn more.

guochengqian commented 5 years ago

Hugo has some options to control this - see hrefTargetBlank in config.toml. Hugo's documentation explains this and you can also search Hugo forums to learn more.

Thank you very much. I set hrefTargetBlank to true, and the source code of my website generated by hugo also seems correct. (Computer Science at <a target=_blank href=https://www.kaust.edu.sa/en>King Abdullah University of Science &amp; Technology (KAUST)</a>.) However, when I click King Abdullah University of Science & Technology (KAUST) in my website, the original tab will change with the new tab.

My orginal makedown is : Computer Science at <a target="_blank" href="https://www.kaust.edu.sa/en"> King Abdullah University of Science & Technology (KAUST)</a>

eson-dev commented 4 years ago

Having the same issue as @guochengqian. I have already set hrefTargetBlank = true. Everything works fine on my localhost:1313 but on the published website (hosted by Netlify) it's error behavior: external site opened in original AND new tab.

Edit: Changing it to false didn't change any behavior either. Did I miss something?

seyounger commented 4 years ago

I'm having the same problem. Did anyone figure this out?

alvinntnu commented 4 years ago

I am having the same issue as well. Really appreciate any followup.

gcushen commented 4 years ago

Academic does not generate links in content. This is handled by Hugo and its Markdown renderer, which is configured in config.toml, (as well as possibly Blogdown if you are using RStudio). You can find more info in the docs and forums for those projects.

eson-dev commented 4 years ago

@seyounger @alvinntnu looks like the issue has been fixed in #1511