r-lib / usethis

Set up commonly used 📦 components

Home Page:https://usethis.r-lib.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Case-sensitive logo.png in `use_pkgdown_github_pages()`

cgoo4 opened this issue · comments

usethis has helped me enormously in the whole package building process. Thank you :)

I did though run into a spot of bother with my logo when using use_pkgdown_github_pages() (default "automatic build and deploy" mode ) to publish to Github Pages. The logo rendered correctly locally in all articles, but failed to render when pushed (except in the README). The html for an article in gh-pages was missing the src despite the logo being present in man/figures in the repo:

<img src="" class="logo" alt=""><h1>Showcase</h1>

The solution was to delete logo.PNG from man/figures and push, use_logo("logo.png"), i.e. a lower-case .png, and push again. cgoo4.github.io/ggfoundry/ now displays the logo correctly on all pages. It seems that use_pkgdown_github_pages() is case-sensitive?

The reason I had a capitalised PNG was because the Adobe app I used to make the logo naturally exports as .PNG.

Maybe use_logo() could enforce lower-case?