Skip to content

Set absolute site url to enable the theme's full SEO output - #453

Open
miharp wants to merge 2 commits into
OpenVoxProject:masterfrom
miharp:config/site-url
Open

Set absolute site url to enable the theme's full SEO output#453
miharp wants to merge 2 commits into
OpenVoxProject:masterfrom
miharp:config/site-url

Conversation

@miharp

@miharp miharp commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Since jekyll-vitepress-theme 1.9, the theme ships an SEO layer that can emit canonical URLs, JSON-LD, sitemap.xml, a robots.txt sitemap pointer, and llms.txt/llms-full.txt. Without an absolute url in _config.yml most of that is skipped: the build warns every run, no sitemap is generated, and the llms outputs use relative links.

This sets the production origin in _config.yml and updates the canonical_latest plugin to read the origin from site.url rather than only its hardcoded constant. The constant remains as a fallback for builds where url is unset or overridden (jekyll serve rewrites it to localhost in development).

Verified with a full local build:

  • sitemap.xml is generated (920 URLs, absolute) and robots.txt now advertises it
  • pages get self-canonical links and JSON-LD
  • llms.txt links are absolute instead of relative
  • the numbered "latest twin" collections still canonicalize to their /latest/ URLs (e.g. /openvox/8.x/…/openvox/latest/…), so search engines can dedupe the symlinked copies
  • the theme's "Set an absolute url" build warning is gone
  • jekyll_vitepress.seo.image points at the existing 1200×630 HexagonSticker.png, so pages also get og:image:width/og:image:height and a stable og:image:alt (the theme's documented "production minimum")
  • rubocop clean

Written with AI assistance (Claude, disclosed per the org AI policy); changes reviewed and build-tested locally.

@miharp
miharp requested a review from a team as a code owner August 21, 2026 11:02
@binford2k

Copy link
Copy Markdown
Contributor

Docs and code imply that the seo hash is required to get proper tags rendered.

miharp and others added 2 commits August 22, 2026 06:46
With no absolute url in _config.yml, the theme's SEO layer (added in
jekyll-vitepress-theme 1.9) skips canonical URLs, JSON-LD, and
sitemap.xml, warns on every build, and emits llms.txt with relative
links. Setting the production origin turns all of that on: pages get
self-canonicals, robots.txt advertises the sitemap, and llms.txt links
become absolute.

The canonical_latest plugin now reads the origin from site.url instead
of only its hardcoded constant, which remains as the fallback for
builds where url is overridden or unset (jekyll serve rewrites it to
localhost in development). Its /latest/ canonicals still take
precedence on the numbered twin collections, which search engines can
now use to dedupe the /8.x/ and /latest/ copies.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Michael Harp <mike@mikeharp.com>
The theme emits og:image:width/height and a stable og:image:alt only
when jekyll_vitepress.seo.image is set. HexagonSticker.png is already
1200x630, so point at it explicitly per the theme's production minimum.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Michael Harp <mike@mikeharp.com>
@miharp

miharp commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

@binford2k Thanks, good pointer. Checked the 1.9.1 source: the seo hash is optional (config_for returns {} when it's absent and the image falls back to logo), so url alone already gets canonical, og:, twitter:, JSON-LD, sitemap, and robots.

What it does add is og:image:width/height and a fixed og:image:alt. HexagonSticker.png is already 1200×630, so I pushed a second commit setting seo.image per the theme's production minimum and confirmed those tags now render.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants