Preferably

screenshot of Preferably
bootstrap

Preferably

An accessible template for `pkgdown` websites with dynamic light/dark mode support

Overview

Preferably is an accessible template for pkgdown documentation websites. It offers light and dark themes and utilizes the prefers-color-scheme CSS variable to automatically serve the appropriate theme based on users' operating system settings. Users can also manually toggle between the light and dark themes. In addition to the themes, Preferably enhances the overall reading experience by using richer fonts and a better color scheme for codes.

Features

  • Accessible Themes: Preferably provides light and dark themes for pkgdown documentation websites.
  • Automatic Theme Switching: The template uses the prefers-color-scheme CSS variable to automatically serve the appropriate theme based on users' operating system settings.
  • Manual Theme Toggle: Users can manually toggle between the light and dark themes with a switch in the menu bar.
  • Enhanced Reading Experience: Preferably improves the overall reading experience of pkgdown documentations with richer fonts and a better color scheme for codes.
  • Compatibility with pkgdown 2.0 and Bootstrap 5: Preferably 0.4 is compatible with pkgdown 2.0 and Bootstrap 5.
  • Custom Analytics: Users can add a custom analytic (in addition to ganalytics) to their website using the canalytic option.
  • Flexible Customization: Preferably offers additional options for customization, in addition to the pkgdown customization options.

Installation

To install Preferably, you can download the stable version from CRAN using the following command:

install.packages("preferably")

Alternatively, you can download the development version from GitHub.

Summary

Preferably is an accessible template for pkgdown documentation websites that offers light and dark themes with automatic theme switching based on users' operating system settings. It provides an enhanced reading experience with richer fonts and a better color scheme for codes. The template is compatible with pkgdown 2.0 and Bootstrap 5 and offers flexibility for customization. Additionally, Preferably allows users to add custom analytics and provides a manual toggle for theme selection.

bootstrap
Bootstrap

Bootstrap is the most popular CSS Framework for developing responsive and mobile-first websites.

documentation
Documentation

Documentation themes are built specifically for writing technical and product documentation. They are normally written and maintained in Markdown. The often include a navigation menu, search bar, clear headings, semantic document structure and clean typography.

template
Templates & Themes

A template or theme refers to a pre-designed layout or structure that provides a basic framework for building a specific type of application or website. It typically includes good design, placeholder content and functional features, allowing developers to customize and fill in the details according to their specific needs.