Visitar URL original
Proper support for hexsticker · Issue #3032 · r-lib/pkgdown · GitHub
Skip to content

Proper support for hexsticker #3032

Open

Description

@royfrancis

As far as I can tell, pkgdown does not currently provide a proper way to control the placement of a hexsticker. Instead, it ends up squeezed into the index page almost as an afterthought, as illustrated below.

Image

It would be nice to have a dedicated configuration option in _pkgdown.yml to control its placement. One suggestion would be to position the hexsticker above the sidebar, giving it a more prominent and consistent place in the page layout, as shown below. This would also make it easier to integrate the hexsticker into the overall site design.

Image

Activity

  1. royfrancis commented on Oct 22, 2026

    @royfrancis
    Author

    A quick fix is to add a logo section to your _pkgdown.yml like this:

    home:
      title: Build websites for R packages
      sidebar:
        structure: [logo, links, license, community, citation, authors, dev]
        components:
          logo:
            title: "Hex sticker"
            text: '<img src="logo.png" alt="pkgdown hex sticker">'
    

    This will add the logo to the sidebar on the right. The title is mandatory and pkgdown automatically creates a class (hex-sticker) out of it.

    If your image is too big and to remove the logo title, you add this bit of css to pkgdown/extra.css.

    .template-home aside .hex-sticker > h2 {
      display: none;
    }
    
    .template-home aside .hex-sticker img {
      display: block;
      width: min(140px, 10rem);
      height: auto;
      margin-top: 2rem;
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions