chore(repo): normalize sln line endings and doc OG image URL#191
Draft
ottobolyos wants to merge 2 commits into
Draft
chore(repo): normalize sln line endings and doc OG image URL#191ottobolyos wants to merge 2 commits into
ottobolyos wants to merge 2 commits into
Conversation
Add `*.sln text eol=crlf` to `.gitattributes` so Git always delivers CRLF line endings in the working tree for Visual Studio solution files. Visual Studio for Windows generates a dirty diff each time it opens an LF-terminated `.sln`; pinning CRLF in the attributes eliminates that noise for Windows contributors without affecting the normalized LF blob stored in the object database.
LinkedIn, Slack unfurl, and the classic X crawler reject root-relative
paths for social-card images; an absolute https:// URL is required for
unfurl rendering on those venues. Replace the hard-coded '/logo.png'
value in both og:image and twitter:image with a URL derived from the
DOCS_CANONICAL_URL environment variable, defaulting to the GitHub Pages
host for this repository. Operators deploying to a custom domain override
the default via DOCS_CANONICAL_URL at workflow level.
The landing-page house-style test gains two StartsWith("https://")
assertions for og:image and twitter:image so a future regression back to
a root-relative path fails the E2E suite.
f319cfc to
323339b
Compare
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.
What changed
.gitattributesnow declares*.sln text eol=crlfso Visual Studio for Windows no longer re-encodesMTConnect.NET.slnon open. Git stores the blob with LF normalization and delivers CRLF to the working tree on every checkout, so Windows contributors stop seeing a dirty diff every time they open the solution.docs/.vitepress/config.tsnow derives the canonical Open Graph image URL fromDOCS_CANONICAL_URL(defaulting to the GitHub Pages host for this repository). LinkedIn, Slack unfurl, and the classic X crawler require absolutehttps://…URLs for social-card images; the previous root-relative/logo.pngwas silently discarded by those crawlers and produced blank social previews. Operators deploying to a custom domain can override the default viaDOCS_CANONICAL_URLat workflow level.StartsWith("https://")assertions forog:imageandtwitter:imageso a future regression back to a root-relative path fails the test suite.Why
Both items are mechanical cleanups that surfaced during a review of the merged docs and solution-wireup PRs but were deferred past merge. Folding them into one chore PR avoids two single-commit train slots.
Verification
dotnet build MTConnect.NET.sln— 0 warnings, 0 errors.dotnet test(non-E2E) — all pass.npm run buildindocs/— VitePress build green;og:imageandtwitter:imagerender ashttps://trakhound.github.io/MTConnect.NET/logo.pngin the default deploy.docs/scripts/generate-api-ref.sh— 0 errors, 2146 pages generated.