question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navbar logo and favicon images are not showing up while serving locally for sites with baseUrl

See original GitHub issue

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I’m using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

After updating to docusarus beta 9, the navbar logo image (and favicon image) is not showing up while serving the site locally. This happens with sites having baseUrl (other than /). If I visit http://localhost:3000/{baseUrl}/img/favicon.ico, I see 404 Page Not Found. However, things seems alright while building the site.

Steps to reproduce

  1. Create a brand new site: npx @docusaurus/init@latest init my-site classic

  2. Set a baseUrl in docusaurus.config.js, say /test/

  3. Fire up npm start. This is what I see: Screenshot 2021-11-03 at 9 26 27 PM

  4. Visit http://localhost:3000/test/img/favicon.ico, it gives 404 error.

  5. However, npm run build followed by npm run serve correctly shows the logo.

Expected behavior

Should be able to see the logo and favicon images correctly while serving the site locally.

Actual behavior

Logo and favicon images are not available in website path.

Your environment

  • Public source code: NA
  • Public site URL: NA
  • Docusaurus version used: 2.0.0-beta.9
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Safari 15.1, Node.js 16.13.0
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS 11.6.1

Reproducible demo

No response

Self-service

  • I’d be willing to fix this bug myself.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Josh-Cenacommented, Nov 20, 2021

Hi, due to the number of duplicate reports on this issue I’ve reopened the original one. This has already been fixed and will be released soon. If you are experiencing the same, please either stay on beta.8 or use the canary release.

1reaction
Josh-Cenacommented, Nov 4, 2021

@honeytidy Please use the canary release: https://docusaurus.io/community/canary

Read more comments on GitHub >

github_iconTop Results From Across the Web

Favicon Not Showing Up - How to Fix In Chrome, Wordpress ...
You need to ensure that your favicon's file path is correct. If you have your icon in the images folder, then make sure...
Read more >
How to add a favicon to a Next.js static site? - Stack Overflow
Create a /static folder in project root. This will be added to the static export folder. Add favicon file in /static folder.
Read more >
How to Fix the Favicon Not Showing Up Issue - Sitechecker
The easiest way is to enter the URL of the site into the browser and see if the logo is displayed next to...
Read more >
Theme configuration - Docusaurus
Sets the navbar style, ignoring the dark/light theme. Navbar logo​. The logo can be placed in static folder. Logo URL is set to...
Read more >
GitLab Appearance
After you select and upload an icon, select Update appearance settings at the bottom of ... The logo image appears between the title...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found