Skip to content

createConfig() silently drops opts.head — OG/Twitter meta never emitted on any product docs #6

Open

Description

@ajianaz

Repo: codecoradev/codecora-theme · Pinned by: every product docs site (uteke, covecto, …) via github:codecoradev/codecora-theme#<sha>

Bug

createConfig() interface declares:

/** Extra VitePress head tags (merged after theme defaults). */
head?: UserConfig['head']

…but the returned defineConfig({ head: [...] }) is a hardcoded array (preconnect ×2, Google Fonts stylesheet, theme-color, accent style). opts.head is never read — anything a product passes is silently dropped.

Impact (verified live 2026-10-05)

  • covecto docs: og:title/og:description/twitter:card were added to docs/.vitepress/config.ts head in v0.1.1 (Sept) — never appeared in any build; today's fix had to move all social meta into docs/index.md frontmatter instead (PR seo(docs): keyword-rich title, description, OG/Twitter meta, canonical covecto#38)
  • uteke docs (codecora.dev/uteke/docs): same class — live HTML has <title>Uteke</title> (7 chars), no og:/twitter: tags at all

Suggested fix

In createConfig():

head: [
  ...themeDefaults,          // existing preconnect/font/theme-color/accent entries
  ...(opts.head ?? []),
],

Extra notes

  • Root-page <title> equals opts.title verbatim (no suffix) while subpages use "<Page> | <site title>" — so products should pass a keyword-rich site title, or accept a bare one on the root page
  • No per-page canonical/og:url is emitted anywhere; only frontmatter head: works today (VitePress frontmatter head merges reliably, values containing : must be YAML-quoted)

Activity

  1. ajianaz commented on Oct 5, 2026

    @ajianaz
    ContributorAuthor

    Additional findings from the 2026-10-05 live vision audit (post-fix re-verification of codecora.dev/covecto/docs after PR codecoradev/covecto#40):

    1. Secondary button text contrast — Install / GitHub pills render light-bg + light text (near-invisible). VitePress default .VPButton.alt colors don't adapt to the dark theme tokens. Theme should set alt-button text to a dark ink on light bg (or invert).
    2. No footer on docs pages — home layout ends after content; no copyright/links footer anywhere. Suggest theme-level default footer (brand + legal + repo links), overridable per product.
    3. Literal # in rendered headings — ## Engine Comparison renders with a visible # prefix (theme default h2::before content). Should be removed in the shared theme.
    4. Navbar logo path — hardcodes src: '/logo.png' which never resolves under base: '/<product>/docs/' (workaround shipped per-repo via docs/public/logo.png; proper fix = {base}logo.png or theme-shipped asset).
    5. (already in this issue) opts.head silently dropped.

    All five are shared-theme defects affecting every product docs site (verified on covecto; uteke confirmed for logo + head at least).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions