Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Responsive News Homepage using Nuxt/Vue and Tailwind CSS

nuxt, vue, tailwind-css
Lincoln Hutchinson•50
@linchutchinson
A solution to the News homepage challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello! I had two particular points on this project that I wanted to get feedback on.

First, this was my first time building a reactive website, so I'd like it if people experienced with that sort of thing could let me know if there are any parts that I got wrong, things I could improve upon, or gotchas that I may not be aware of.

Second, this is a bit of a specific issue, but I had to wrestle with Nuxt to get it to handle urls properly when I switched base urls between my local version of the site and the one hosted on Github pages. Particularly, in the TopArticles component, I had to add the baseUrl from the runtime config as part of the template. And for the favicon, instead of specifying the url in the nuxt.config.ts file, I had to put it in the app.vue layout so I could again apply the baseUrl.

When I just put in the urls for both of these elements the straightforward way, they weren't updated properly when generating the site files with a new base url, and the links were broken as a result. My adjustments fixed that issue, but it feels like a hack-y solution. I wonder if anyone more familiar with Nuxt could tell me if there's a cleaner way to handle these issues.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Lincoln Hutchinson's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License