skip to Main Content

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

2

Answers


  1. i know that you wrote that tried css, but this must work if you have an css custom for the rmarkdown doc:

    .main img {
    max-width: 36%; #ajust for your please
    height: auto; }

    Login or Signup to reply.
  2. 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
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search