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.
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)
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.
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.
Dark mode
Please add a dark mode option to your website by:
pkgdown/extra.css- this contains customisations for some of the colours in dark mode. You can directly copy this file._pkgdown.ymlfile:lightswitch: trueoptionincludes:css: pkgdown/extra.cssSee the admiral file for reference.
Tooltips
Please add tooltips (i.e. labels which appear above icons on the website) by:
_pkgdown.ymlaria-labelattribute (this is the text in the tooltip)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.
Do this by:
common.ymlfile with all the admiral workflows here into your repo..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.{admiralophtha} PR for reference.