Skip to content
wdj

SEO

Implemented Utilities

Server-rendered page metadata: title, description, canonical, Open Graph, language alternatives and safe JSON-LD.

A wdj composition built from the existing component library.

Presentation commands show demo feedback. Read the interaction guide to connect real actions.

Page metadata

One head include, with explicit page-specific values.

Include once inside the document head. Pass a page-specific metadata dictionary from Django; the component validates absolute URLs and escapes text and JSON-LD.

# views.py
seo = {
    "title": "Products | Example",
    "description": "Browse our available products.",
    "canonical_url": "https://example.com/products/",
    "site_name": "Example",
}

# Inside base.html <head>, replacing existing metadata:
{% include "wdj/components/seo.html" with seo=seo only %}
{% include "wdj/htmx_config.html" only %}

Optional keys: robots, type, locale, image, image_alt, alternates and json_ld. The example above is escaped; it does not insert a second title or canonical into this page.

SEO and HTMX integration checklist
Show template
{% load wdj %}
<div class="grid gap-3">
  <p class="text-base text-kumo-subtle">Include once inside the document head. Pass a page-specific metadata dictionary from Django; the component validates absolute URLs and escapes text and JSON-LD.</p>
  <pre tabindex="0" class="overflow-x-auto rounded-lg bg-kumo-elevated p-4 font-mono text-base"><code>{% verbatim %}# views.py
seo = {
    "title": "Products | Example",
    "description": "Browse our available products.",
    "canonical_url": "https://example.com/products/",
    "site_name": "Example",
}

# Inside base.html &lt;head&gt;, replacing existing metadata:
{% include "wdj/components/seo.html" with seo=seo only %}
{% include "wdj/htmx_config.html" only %}{% endverbatim %}</code></pre>
  <p class="text-base text-kumo-subtle">Optional keys: <code>robots</code>, <code>type</code>, <code>locale</code>, <code>image</code>, <code>image_alt</code>, <code>alternates</code> and <code>json_ld</code>. The example above is escaped; it does not insert a second title or canonical into this page.</p>
  <a href="/guide/#seo" class="text-base text-kumo-link hover:underline">SEO and HTMX integration checklist</a>
</div>

Language and structured data

Reciprocal translations and schema matching the visible page.

Pass Python dictionaries, not JSON strings. Add only language versions and content that exist on the consuming site.

seo["alternates"] = [
    {"lang": "en", "url": "https://example.com/en/products/"},
    {"lang": "fr", "url": "https://example.com/fr/products/"},
]
seo["json_ld"] = {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {"@type": "ListItem", "position": 1,
         "name": "Home", "item": "https://example.com/"},
        {"@type": "ListItem", "position": 2,
         "name": "Products", "item": "https://example.com/products/"},
    ],
}

Each translation must link back to the others and use its own canonical URL. For a private page, set seo["robots"] = "noindex, nofollow"; access control remains the application's responsibility.

Show template
{% load wdj %}
<div class="grid gap-3">
  <p class="text-base text-kumo-subtle">Pass Python dictionaries, not JSON strings. Add only language versions and content that exist on the consuming site.</p>
  <pre tabindex="0" class="overflow-x-auto rounded-lg bg-kumo-elevated p-4 font-mono text-base"><code>seo["alternates"] = [
    {"lang": "en", "url": "https://example.com/en/products/"},
    {"lang": "fr", "url": "https://example.com/fr/products/"},
]
seo["json_ld"] = {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {"@type": "ListItem", "position": 1,
         "name": "Home", "item": "https://example.com/"},
        {"@type": "ListItem", "position": 2,
         "name": "Products", "item": "https://example.com/products/"},
    ],
}</code></pre>
  <p class="text-base text-kumo-subtle">Each translation must link back to the others and use its own canonical URL. For a private page, set <code>seo["robots"] = "noindex, nofollow"</code>; access control remains the application's responsibility.</p>
</div>

API Reference

Prop Type Default Description
dict {} Page metadata: title, description, canonical_url, robots, site_name, type, locale, image, image_alt, alternates [{lang, url}] and json_ld (dict/list). Include once in head; see docs/SEO.md.

Accessibility notes

Every interactive component keeps real semantics and keyboard support: native controls where possible, ARIA only where necessary, and a visible focus ring. See the Accessibility page for the shared contract.

Read the accessibility contract

Components

Components overview
AccountMenuReusable account navigation with nested preference menus, persisted appearance and application-owned actions.
AutocompleteFree-form input with local or HTMX-filtered suggestions.
BadgeSolid, tinted, outline and dot status labels.
BannerInline message bar with variants and optional action.
BreadcrumbsTrail navigation in two sizes.
ButtonVariants, sizes, shapes, icons and loading state.
ButtonGroupJoins a small set of tightly-coupled buttons into a single control (split buttons).
CheckboxSingle checkbox and indeterminate state.
ClipboardTextRead-only text field with a one-click copy-to-clipboard button.
Code / CodeHighlightedEscaped Pygments grammar highlighting, multiline tokens, line numbers, highlighted lines and localized copying.
CollapsibleComposable disclosure component for showing and hiding content.
Combobox / AutocompleteKumo-styled input/button triggers, search inside the popup, grouped local choices and debounced HTMX search.
CommandPaletteAccessible spotlight search overlay with Cmd+K keyboard shortcut.
DatePickerKumo-styled date and datetime popups; inline single, multiple and range calendars with bounds/presets.
DateRangePickerStyled popup or inline range calendar with bounds, presets and separately named form values.
DialogNative <dialog> modal with focus management.
DrawerEdge-anchored modal panel. LayerDialog has its own layered component.
DropdownMenuNative details menu with delegated keyboard navigation and dismissal.
EmptyEmpty-state placeholder with icon and action.
FieldLabel + description + error wrapper. Built into each control.
FieldSelectorSearchable column selector with ordering, required fields, optional persistence and table integration.
FilterBuilderReusable filter editor with AND conditions, typed values, draft/apply semantics and a JSON form contract.
FlowDirected diagrams with branches, SVG connectors, custom anchors and responsive local scrolling.
GridResponsive CSS grid layout container with preset column configurations.
InlineCopyTextCompact borderless copy control for IDs and short values.
InputText field with label, description, leading/trailing icons.
InputAreaMulti-line textarea with auto-resize option.
InputGroupInput field with seamless prefix, suffix, and addon attachments.
LabelForm field label, optional marker and tooltip.
LayerCardCompound surface card with distinct primary and secondary layers.
LayerDialogLayered native modal with actions, forms, nested dialogs and pending states.
LinkInline, current and plain text links.
LoaderAnimated spinner in three sizes.
MenuBarCompact view selector using native radio semantics.
MeterProgress bar showing a measured value within a known range.
PaginationA page navigation component for navigating through paginated content.
PopoverAnchored popup with interactive content.
RadioRadio group, vertical and horizontal.
SelectKumo-styled Alpine dropdown with groups, rich options and multiple selection; native form values and fallback.
SensitiveInputPassword/secret input with reveal toggle and copy button.
SEOServer-rendered page metadata: title, description, canonical, Open Graph, language alternatives and safe JSON-LD.
SeparatorHorizontal / vertical rules with optional label.
SidebarRecursive navigation groups, pinned links, account/zone views, search, loading, resize and full-screen mobile breadcrumbs.
SkeletonShimmer placeholder.
SliderInset single/range selection with vertical grips, value badges, endpoint labels and native keyboard/form behavior.
SurfaceBordered surface panel with header slot.
SwitchOn/off toggle in three sizes.
TableServer-driven tables with selection, sticky columns, field configuration and expandable details.
Table of contentsPage section navigation tree with active link indicator.
TabsSegmented and underline tabs with a sliding indicator, responsive overflow and local Alpine or URL/HTMX state.
TagInputMulti-value badge input for tags and recipients.
TextHeading, body, secondary, success, error and mono text.
TimeRangePickerReusable time filter with relative presets, calendar selection, exact times and UTC form values.
ToastyExpandable notification stack with variants, paused expiry and a live region.
ToolbarCompact grouped controls with shared borders, composed filters and keyboard arrow navigation.
TooltipHover and focus tooltip with grouped delays, Escape dismissal and viewport bounds.
↑ ↓ Navigate ↵ Select