Theming & Appearance
Great Docs ships with a polished default look, but every visual layer of the site is configurable. You can adjust the color scheme, add animated gradients to the navbar and content areas, enable dark mode, display an announcement banner, inject custom HTML into the page head, configure logos, and set up a hero section on your landing page. All of these options live in great-docs.yml.
This page covers the visual customization options. For functional settings (API discovery, parsers, GitHub integration, etc.), see Configuration.
Dark Mode Toggle
Great Docs includes a light/dark mode toggle in the navbar. It respects the visitorβs system preference on first visit and remembers their choice in local storage for subsequent visits. The toggle is enabled by default.
To enable or disable the toggle:
great-docs.yml
dark_mode_toggle: true # Enabled by defaultgreat-docs.yml
dark_mode_toggle: false # Disable the toggleWhen enabled, the toggle provides instant switching without a page reload. Visitors who prefer reduced motion in their operating system settings will still see the theme change, but without the transition animation.
Animated Gradient Presets
The announcement banner, navbar, and content area all support gradient backgrounds. The banner and navbar use animated gradients that shift slowly across the element, creating a subtle, eye-catching effect. The content area uses a soft radial glow at the top of each page. Each preset includes paired light-mode and dark-mode color palettes.
Available Presets
Great Docs ships with eight gradient presets:
| Preset | Description |
|---|---|
sky |
Soft sky blues |
peach |
Peach and blush |
prism |
Mint, sky, and lavender |
lilac |
Lilac and pink |
slate |
Cool grays |
honey |
Warm cream and apricot |
dusk |
Soft lavender-blue |
mint |
Pale aqua |
Gradient on the Content Area
Use the top-level content_style key to add a subtle radial glow at the top of the main content area:
great-docs.yml
content_style: lilacThe glow fades out smoothly and does not interfere with text or interactive elements. It uses the same preset names as the banner and navbar gradients.
By default the glow appears on all pages. To restrict it to the homepage only, use the dictionary form with a pages key:
great-docs.yml
content_style:
preset: lilac
pages: homepage # "all" (default) or "homepage"Combining All Three
You can use the same preset or different presets for the banner, navbar, and content area. Here is an example that mixes two presets:
great-docs.yml
announcement:
content: "New release!"
style: sky
navbar_style: sky
content_style:
preset: lilac
pages: homepageCustom Head Content
Use include_in_header to inject custom HTML into the <head> of every page. This is useful for adding analytics scripts, custom meta tags, external stylesheets, or any other head content that needs to load before the page renders.
A single string is treated as inline HTML:
great-docs.yml
include_in_header: '<link rel="stylesheet" href="https://example.com/custom.css">'For multiple entries, use a list. Each item can be a string (inline HTML) or a dictionary with a text or file key:
great-docs.yml
include_in_header:
- text: |
<script>
console.log("hello from great-docs");
</script>
- text: '<meta name="custom" content="value">'
- file: custom-head.htmlYour entries are merged with Great Docsβ own head injections (Font Awesome, theme scripts, etc.) so everything cooperates automatically.
Logo
Great Docs can display a logo in the navbar instead of the plain-text package name. Logos are automatically detected from conventional file locations, or you can configure them explicitly.
Auto-Detection
If you place logo files in your project using common naming conventions, Great Docs will find and use them automatically with no configuration needed:
my-package/
βββ logo.svg # Primary logo
βββ assets/
β βββ logo.svg # Also auto-detected
β βββ logo-dark.svg # Dark-mode variant
Auto-detection checks these paths in priority order:
logo.svg/logo.png(project root)assets/logo.svg/assets/logo.pngdocs/assets/logo.svg/docs/assets/logo.png{package_name}_logo.svg/{package_name}_logo.png
If a file named logo-dark.svg (or {stem}-dark.{ext}) exists alongside the primary logo, it is automatically used for dark mode.
Explicit Configuration
For full control, configure the logo in great-docs.yml:
great-docs.yml
logo:
light: assets/logo.svg
dark: assets/logo-dark.svgYou can also set additional options:
great-docs.yml
logo:
light: assets/logo.svg
dark: assets/logo-dark.svg
alt: My Package # Alt text (defaults to display_name)
href: https://example.com # Logo link target (defaults to site root)
logo_show_title: true # Show text title alongside logo (default: false)What Happens When a Logo Is Set
When a logo is configured (or auto-detected):
- The logo image replaces the text title in the navbar.
- A dark-mode variant is used automatically when the user switches themes.
- The text title is hidden by default (set
logo_show_title: trueto show both). - Favicons are generated automatically from the logo (see below).
Favicon
Great Docs automatically generates a complete set of favicons for your site. If a logo is configured, favicons are derived from it with no extra setup needed. You can also specify a dedicated favicon image.
Automatic Generation from Logo
When a logo is set, Great Docs generates all standard favicon formats automatically:
| File | Purpose |
|---|---|
favicon.ico |
Classic favicon (16, 32, and 48px embedded) |
favicon.svg |
Modern browsers (SVG, infinite scaling) |
favicon-16x16.png |
Small icon contexts |
favicon-32x32.png |
Standard tab icon |
apple-touch-icon.png |
iOS home screen (180x180) |
These files are created in the build directory and proper <link> tags are injected into every pageβs <head>.
Dedicated Favicon
If you want a different image for your favicon (for example, a simplified icon rather than the full logo), set the favicon option:
great-docs.yml
favicon: assets/favicon.svgThis generates the same set of raster variants as the logo-based approach, but uses your dedicated favicon source image instead. Both SVG and PNG source files are supported.
Non-Square Source Images
Source images do not need to be perfectly square. Non-square images are automatically centered on a transparent canvas, preserving the original aspect ratio. This means wide logos will not be distorted; they will be padded with transparency above and below.
Hero Section
The hero section is a prominent banner displayed at the top of the landing page, showcasing the package logo, name, tagline, and badges. It is generated automatically when a logo is present and gives your documentation a polished, professional look.
Auto-Enable Behavior
The hero section auto-enables when a logo is configured (or auto-detected). No explicit configuration is needed: if you have a logo, you get a hero. The hero displays:
- The package logo (with dark-mode support)
- The package display name
- The package description from
pyproject.toml - Badges auto-extracted from the README (shields.io badges, etc.)
Disabling the Hero
To disable the hero entirely (for example, if you prefer your index.qmd or README.md rendered as-is):
great-docs.yml
hero: falseCustomizing the Hero
Each hero component can be overridden or suppressed individually:
great-docs.yml
hero:
name: "My Package" # Override the auto-detected name
tagline: "A better way to build things" # Override the description
logo_height: 120px # Default: 200px
badges: false # Suppress badge displaySet any component to false to suppress it:
great-docs.yml
hero:
name: false # Hide the name (logo and tagline only)
badges: false # No badgesHero Logo Auto-Detection
Great Docs can also auto-detect hero-specific logo files from conventional file locations, with no configuration needed. Place files using these naming conventions:
my-package/
βββ assets/
β βββ logo-hero.svg # Hero logo (single image)
β βββ logo-hero-light.svg # Hero logo (light variant)
β βββ logo-hero-dark.svg # Hero logo (dark variant)
Auto-detection checks these paths in priority order:
logo-hero.svg/logo-hero.png(project root)assets/logo-hero.svg/assets/logo-hero.pnglogo-hero-light.svg/logo-hero-light.png(project root)assets/logo-hero-light.svg/assets/logo-hero-light.png
If a file named logo-hero-dark.svg (or logo-hero-dark.png) exists alongside the primary hero logo, it is automatically used for dark mode.
When hero logo files are detected, the hero section auto-enables even if no logo or hero config is set in great-docs.yml.
The full logo fallback chain for the hero is:
- Explicit
hero.logoingreat-docs.yml - Auto-detected hero logo files (
logo-hero.*) - Explicit top-level
logoingreat-docs.yml - Auto-detected navbar logo files (
logo.*)
Explicit Badge List
By default, badges are auto-extracted from the README. You can provide an explicit list instead:
great-docs.yml
hero:
badges:
- alt: PyPI version
img: https://img.shields.io/pypi/v/my-package
url: https://pypi.org/project/my-package/
- alt: License
img: https://img.shields.io/badge/license-MIT-green
url: https://opensource.org/licenses/MITHero Section Summary
| Option | Type | Default | Description |
|---|---|---|---|
hero |
bool / dict |
auto | false to disable; true or {} to enable; dict to customize |
hero.name |
str / false |
display name | Package name shown in hero |
hero.tagline |
str / false |
description | Tagline shown below the name |
hero.logo |
str / dict / false |
auto-detect | Hero-specific logo (can have light/dark keys); auto-detects logo-hero.* files |
hero.logo_height |
str |
200px |
CSS max-height for the hero logo |
hero.badges |
list / false |
auto |
Explicit badge list or false to suppress |
Next Steps
- Configuration covers the functional settings (API discovery, parsers, GitHub integration)
- User Guides explains how to write and organize narrative documentation
- Deployment shows how to publish your site to GitHub Pages