Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress logo if it is already included in the README at a location other than H1 header #2184

Closed
IndrajeetPatil opened this issue Aug 22, 2022 · 4 comments
Labels
feature a feature request or enhancement

Comments

@IndrajeetPatil
Copy link
Contributor

IndrajeetPatil commented Aug 22, 2022

Motivation

This is similar to #2083.

Sometimes I want to include the package logo at a custom location in the README.

For example, instead of including it in the H1 header:

# Minimal reprexes for `{pkgdown}` issues  <img src="man/figures/logo.png" align="right" width="240" />

I include it below the header:

# Minimal reprexes for `{pkgdown}` issues 

<img src="man/figures/logo.png" align="right" width="240" />

Issue

If I do this, on README, this looks good:

Screenshot 2022-09-06 at 20 07 20

But, on the {pkgdown} website homepage, the logo is now included twice:

Screenshot 2022-09-06 at 20 11 46

Is it possible to not include it in the header if it is to be displayed somewhere else in the README?

Reprex

Minimally reproducible example: https://github.com/IndrajeetPatil/minimalReprex

@maelle maelle added the feature a feature request or enhancement label Oct 20, 2022
@egouldo
Copy link

egouldo commented Nov 16, 2023

Any update on when this issue is planned for?

@nvelden
Copy link

nvelden commented Jan 6, 2024

Running into the same issue. I now every time have to go to the docs/index.html file and remove the <img src="logo.png" class="logo" alt=""><h1> line.

@pepijn-devries
Copy link

pepijn-devries commented Feb 6, 2024

Wouldn't adding class="pkgdown-hide" to the <img> tag (or embedding it in a div with that class) solve this issue? See:

https://pkgdown.r-lib.org/news/index.html#pkgdown-200

@hadley
Copy link
Member

hadley commented Apr 12, 2024

I formally endorse the use of pkgdown-hide for this purpose. Thanks for the suggestion @pepijn-devries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

6 participants