ropensci-org / rotemplate

pkgdown template for rOpenSci packages :nail_care: :sparkles:
https://docs.ropensci.org/rotemplate
Other
25 stars 6 forks source link

add logo everywhere #71

Closed maelle closed 2 years ago

maelle commented 2 years ago

Fix #21

Inject the logo so that pkgdown uses it everywhere (in head metadata but also all pages). Now, the problem is that if you use build_ropensci_docs() locally you end up with the logo in man/figures.

maelle commented 2 years ago

Maybe too much :thinking:

jeroen commented 2 years ago

What does this do for packages that have their own logo in the readme such as https://docs.ropensci.org/targets/

maelle commented 2 years ago

Nothing because find.logo(path) is not NULL.

And pkgdown strips the logo in the README https://github.com/r-lib/pkgdown/blob/dcec859cab08ff8852f5ee5ab09f3f57ec038805/R/tweak-page.R#L85

jeroen commented 2 years ago

We should test this on a few ropensci repos with actual logo's because when I implemented this, that part in pkgdown didn't work very well. Some ropensci packages my have logo's in slightly different ways.

Also note that the old code is using find_old_footer_banner() to remove a legacy banner which we used to add to readme files (the banner is both ugly and redundant on docs.ropensci.org).

maelle commented 2 years ago

I'll come back to this next week or later, but listing a few packages with logos

jeroen commented 2 years ago

Does this PR fix https://docs.ropensci.org/tradestatistics/ ?

maelle commented 2 years ago

Does this PR fix docs.ropensci.org/tradestatistics ?

No I think that logo does not live at a path where pkgdown would find it.

Furthermore regarding the sponsor image, should it be tweaked by the author so that it's not at the top?

maelle commented 2 years ago

targets website would look fine with this.

maelle commented 2 years ago

@jeroen would you mind having a look at this again? Thank you!

jeroen commented 2 years ago

You have tested this on a few sites with custom logos, right?