sphinx-material icon indicating copy to clipboard operation
sphinx-material copied to clipboard

Can't get my logo to show up in the header

Open larryc1200 opened this issue 2 years ago • 1 comments

I am trying to get my logo to show up next to the title in the header, and it doesn't seem to work. I am using

html_logo = "xyz.png"

And no matter what I do it won't appear. The sphinx-build finds the file (I tested to ensure that it would give an error if I provide the wrong file or location), but the logo will not appear. In addition, it appears to create a blank link in the code, so you get:

image

And Sphinx also gives a 404 error. The 404 error shows up whether or not I use the "html_logo" option. So I'm not sure if it is related or not.

larryc1200 avatar Jul 01 '23 18:07 larryc1200

I was playing around a bit, and if I take the header.html file and replace the logo variable check with a logo_url check, then replace the pathto with the variable logo_url, it works. Apparently the variable logo was replaced with logo_url in one of the recent updates to Sphinx. So the new template section looks like this:

image

I noticed that there is a similar issue with sidebar.html. For that one, I just commented out the logo reference so that it looks like this:

image

larryc1200 avatar Jul 01 '23 23:07 larryc1200