rohit-gohri / redocusaurus

OpenAPI for Docusaurus with Redoc
https://redocusaurus.vercel.app/
MIT License
600 stars 111 forks source link

Logo from spec (x-logo) not being rendered. #334

Closed ksiczek closed 4 months ago

ksiczek commented 4 months ago

Hi there,

I configured a logo using the x-logo in the spec but it is getting rendered. I noticed that since the https://github.com/rohit-gohri/redocusaurus/issues/123, if the logo is defined in the spec, the very first item is hidden

.redocusaurus-has-logo .menu-content > div:first-child {
  display: none;
}

However, the thing is that the hidden item itself is the logo. Does the code say if there is a logo, hide the logo? Or do I miss something?

rohit-gohri commented 4 months ago

Hi, that was intentional since docusaurus website headers usually have logos of it's own so to avoid double logos the api docs hides the logo. If it's needed I'll be happy to accept a PR that puts the feature behind an option

ksiczek commented 4 months ago

Does it mean the x-logo is redundant and using it is pointless? I'm docusaurus noob and I was just confused. Anyway, I'm ok with using the general logo ☺️

rohit-gohri commented 4 months ago

Does it mean the x-logo is redundant and using it is pointless?

x-logo is a redoc feature, which is what we use to render the api docs, if you use just that directly then it is quite useful. But docusaurus provides site wide logo so we hide the logo in the api docs, otherwise it will be shown twice.

Anyway, I'm ok with using the general logo ☺️

Cool, I'll close this then. But feel free to open a discussion for questions or issue for bugs/features.