Set absolute site url to enable the theme's full SEO output - #453
Open
miharp wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since jekyll-vitepress-theme 1.9, the theme ships an SEO layer that can emit canonical URLs, JSON-LD,
sitemap.xml, arobots.txtsitemap pointer, andllms.txt/llms-full.txt. Without an absoluteurlin_config.ymlmost 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.ymland updates thecanonical_latestplugin to read the origin fromsite.urlrather than only its hardcoded constant. The constant remains as a fallback for builds whereurlis unset or overridden (jekyll serverewrites it tolocalhostin development).Verified with a full local build:
sitemap.xmlis generated (920 URLs, absolute) androbots.txtnow advertises itllms.txtlinks are absolute instead of relative/latest/URLs (e.g./openvox/8.x/…→/openvox/latest/…), so search engines can dedupe the symlinked copiesurl" build warning is goneWritten with AI assistance (Claude, disclosed per the org AI policy); changes reviewed and build-tested locally.