Skip to content

Various updates to the pkgdown website and its functionalities #125

@manciniedoardo

Description

@manciniedoardo

Dark mode

Please add a dark mode option to your website by:

  • Adding a file pkgdown/extra.css - this contains customisations for some of the colours in dark mode. You can directly copy this file.
  • Updating your _pkgdown.yml file:
    • add lightswitch: true option
    • add the following line to read in the custom css:
      includes:
      css: pkgdown/extra.css
  • add lightswitch toggle to the navbar

See the admiral file for reference.

Image

Tooltips

Please add tooltips (i.e. labels which appear above icons on the website) by:

  • Injecting the following javascript through your _pkgdown.yml
  • Ensuring every icon has an aria-label attribute (this is the text in the tooltip)
Image Image

PR website workflow

Please update your CICD workflows such that you activate the new PR website workflow, which makes it so that when you make a new PR with the keyword [create website] in the title, a bot will add a comment with the link to the published website, without you having to generate and render the website locally.

Image

Do this by:

  • Copying the {admiral} common.yml file with all the admiral workflows here into your repo.
  • Performing a diff to see the changes and reverting any you don't want to inherit (e.g. do not activate multiversioning docs if not using them).
  • Add the following at the bottom of your PR checklist (.github/pull_request_template.md): To create the website for the content of this PR add "[create website]" to the title of the pull request.
  • Making a new PR with [create website] in the title and seeing if it all works correctly

{admiralophtha} PR for reference.

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