← GDG /

#222 gdtest_hero_wordmark

#222 gdtest_hero_wordmark OK CONFIG
Separate hero wordmark logo from navbar lettermark
Separate hero wordmark logo (light/dark) from navbar lettermark. Tests that hero.logo can specify a different image with light/dark variants from the top-level logo used in the navbar.
View Site → Build Log ๐Ÿงช Test Coverage

Build Mode

● Has great-docs.yml

This package ships a pre-supplied config. The great-docs init step is skipped and great-docs build uses the spec-defined configuration directly. Tests specific config options and their rendered output.

Dimensions

K13
K13funding configconfig

Source Files

๐Ÿ“ assets/
๐Ÿ“„ lettermark-dark.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
  <rect width="32" height="32" rx="6" fill="#4da3ff"/>
  <text x="16" y="22" text-anchor="middle" fill="#fff" font-size="16" font-weight="bold">LM</text>
</svg>
๐Ÿ“„ lettermark.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
  <rect width="32" height="32" rx="6" fill="#2780e3"/>
  <text x="16" y="22" text-anchor="middle" fill="#fff" font-size="16" font-weight="bold">LM</text>
</svg>
๐Ÿ“„ wordmark-dark.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 50" width="200" height="50">
  <rect width="200" height="50" rx="8" fill="#4da3ff"/>
  <text x="100" y="33" text-anchor="middle" fill="#fff" font-size="20" font-weight="bold">Wordmark</text>
</svg>
๐Ÿ“„ wordmark.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 50" width="200" height="50">
  <rect width="200" height="50" rx="8" fill="#2780e3"/>
  <text x="100" y="33" text-anchor="middle" fill="#fff" font-size="20" font-weight="bold">Wordmark</text>
</svg>
๐Ÿ“ gdtest_hero_wordmark/
๐Ÿ“„ __init__.py
"""A package with separate hero and navbar logos."""

__version__ = "0.1.0"
__all__ = ["render"]


def render(template: str) -> str:
    """
    Render a template string.

    Parameters
    ----------
    template
        The template to render.

    Returns
    -------
    str
        The rendered output.
    """
    return template
๐Ÿ“„ README.md
# gdtest-hero-wordmark

A package with separate hero and navbar logos.

## Features

- Renders templates
๐Ÿ“„ great-docs.yml
display_name: Hero Wordmark
logo:
  light: assets/lettermark.svg
  dark: assets/lettermark-dark.svg
hero:
  logo:
    light: assets/wordmark.svg
    dark: assets/wordmark-dark.svg
  logo_height: 100px