# Sponsor advertisements

Drop 728×90 image files (PNG, JPG, WebP, SVG, or animated GIF) into this folder.
Hugo enumerates everything in this directory at build time and serves them to
`layouts/partials/sponsor-spot.html`, which picks one at random per page-load via
inline JS.

## Conventions

- **Dimensions:** 728×90 (standard "leaderboard" IAB size). Retina variants at
  1456×180 are fine — they render the same on screen at 728×90.
- **File size:** keep under ~80 KB; this loads on every page.
- **Formats supported:** `.png`, `.jpg`, `.jpeg`, `.webp`, `.svg`, `.gif`.
  Hidden files and `.gitkeep` are skipped automatically.
- **Alt text:** the partial uses a generic "Sponsor advertisement" alt by default.
  Per-image alt text and click-through URLs are configured via the manifest
  documented below.

## Click-through URLs and alt text

Per-image click-through URLs and alt text live in `data/sponsors.yml` at the
repo root — NOT inside this folder. Keys are filenames here; values are an
optional `url` and `alt`:

```yaml
my-sponsor.png:
  url: https://example.com/partner-page
  alt: "Example Partner — Spring 2026 sponsor"
```

Files NOT listed in `data/sponsors.yml` still rotate; they just render as
plain images with no link and a generic "Sponsor advertisement" alt. So the
manifest is opt-in per file.

URL-wrapped images use `target="_blank"` (open in new tab) and
`rel="sponsored noopener"` — Google's recommended rel for paid links plus
security against the destination controlling our window.

## Adding a new sponsor

1. Drop the 728×90 image file into this folder.
2. (Optional) Add a `{filename}: { url, alt }` entry in `data/sponsors.yml`
   for the click-through URL and alt text. Skip this step for a no-link image.
3. Run `make build` (or `hugo server` already running picks it up automatically).
4. Reload any page — it rotates in with the others.

## Removing a sponsor

Delete the file. Hugo will stop serving it on the next build.
