Theming & Appearance
The default Great Docs site looks polished out of the box, but most projects want their documentation to reflect their own identity. Great Docs gives you control over every visual layer of the site: the color scheme, navbar styling, dark mode, logos, hero section, icons, and more. All of these options live in great-docs.yml, so you can adjust the look without writing any CSS or JavaScript.
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 disable the toggle, set dark_mode_toggle to false in great-docs.yml:
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.
GitHub Link Style
Great Docs automatically adds a GitHub link to the navbar when it detects your repository URL. The github_style option controls how that link is displayed:
great-docs.yml
github_style: widget # Default: interactive widget with stats dropdowngreat-docs.yml
github_style: icon # Simple GitHub icon linking to the repoThe widget style shows a GitHub icon that, on hover, reveals a dropdown with live star, fork, issue, and pull request counts. The icon style renders a plain GitHub icon that links directly to the repository.
Display Name
By default, Great Docs uses your package name (from pyproject.toml) in the navbar and page titles. If your package name uses underscores or hyphens (e.g., great_docs or great-docs), you can set a friendlier display name:
great-docs.yml
display_name: "Great Docs"This name appears in the navbar title, the hero section (if enabled), the page <title> tag, and anywhere else the package name is shown to visitors.
GitHub Link Style
A floating button appears in the bottom-right corner of the page after the visitor scrolls down, providing a one-click way to return to the top. The button uses smooth scrolling and automatically shifts upward when it would overlap with the prev/next page navigation links. It is enabled by default.
great-docs.yml
back_to_top: true # Enabled by defaultgreat-docs.yml
back_to_top: false # Disable the buttonThe button respects the visitor’s prefers-reduced-motion setting: when reduced motion is preferred, scrolling is instant rather than animated.
When back_to_top is enabled, a companion On this page button also appears on mobile viewports (below 768 px). This round floating button sits directly above the back-to-top button and opens a compact table-of-contents panel. Tapping a heading scrolls to that section and dismisses the panel whereas tapping outside the panel dismisses it without navigating. The button is hidden on tablet and desktop widths where the sidebar TOC is already visible.
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. Each bar below shows the light-mode gradient on the left and the dark-mode gradient on the right:
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: homepageAccent Color
The accent color is a site-wide tint used by shortcodes (like the horizontal rule), gradient presets, and other accent-colored elements. It sets the --gd-accent CSS custom property, which you can also reference in custom stylesheets.
A single string applies the same color in both light and dark mode:
great-docs.yml
accent_color: "#6366f1"For per-mode colors, use a dictionary:
great-docs.yml
accent_color:
light: "#6366f1"
dark: "#818cf8"If you don’t set an accent color, Great Docs uses its built-in defaults.
Custom 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 |
Inline Icons New in 0.6
Beyond navbar and sidebar icons, you can place Lucide icons anywhere in your .qmd content using the icon shortcode. Icons scale with the surrounding text, sit on the baseline, and inherit the text color.
Basic Usage
{{< icon heart >}}
This renders inline: (sized to match the surrounding text).
A few more examples: rocket, star, check, book-open. Icon names follow the same Lucide naming convention described above.
Size
By default icons are 1em tall (matching the current font size). Use size to specify a different size in pixels (the value is converted to em units so the icon still scales with its context):
{{< icon star size="12" >}} small
{{< icon star >}} default (16px = 1em)
{{< icon star size="24" >}} large
{{< icon star size="32" >}} very large
Result: small · default · large · very large
Accessibility
By default icons are decorative (aria-hidden="true"). When an icon conveys meaning on its own, add a label:
{{< icon alert-triangle label="Warning" >}}
This replaces aria-hidden with aria-label="Warning" role="img", so screen readers announce the icon’s purpose.
In Context
Icons work in headings, callouts, lists, tables, and blockquotes:
- Documentation pages
- Source code references
- Testing guides
| Status | Icon | Description |
|---|---|---|
| Complete | Feature is stable | |
| In progress | Under active development | |
| Planned | Scheduled for a future release |
Use icons sparingly to draw attention to key information without cluttering the page.
Next Steps
Great Docs gives you control over every visual aspect of your site, from broad choices like gradient themes and dark mode down to fine details like accent colors, icon placement, and footer attribution. Start with the defaults and customize as your project’s identity evolves.
- Configuration covers functional settings like API discovery, parsers, and GitHub integration
- Internationalization shows how translated labels interact with your site’s visual design
- Custom Pages explains how to add standalone HTML pages that inherit your theme
- Horizontal Rules demonstrates the
hrshortcode, which uses the accent color