cssrgithubpkgdown

How to set different logo sizes in GitHub README and pkgdown homepage?


I'm developing an R package and using pkgdown for the website. I want the package logo to appear smaller in the GitHub README but larger on the homepage of the website, similar to the data.table package (GitHub, website).

I tried different CSS approaches but couldn't get it to work. What is the best way to achieve this?


enter image description here


enter image description here


Solution

  • In pkgdown you can specify a different index.md file to make the home page instead of the README.md file that github displays. The instructions in these docs worked for me and now I have a readme for the repo the R package is in then an index.Rmd and index.md in a folder called pkgdown with different widths in markdown like below.

    whatever markdown stuff
    # some header <img src="man/figures/logo.png" width = 200 alt="logo" align="right"/>
    other markdown stuff