Skip to content

chore(repo): normalize sln line endings and doc OG image URL#191

Merged
PatrickRitchie merged 2 commits into
TrakHound:masterfrom
ottobolyos:chore/fix-sln-crlf-and-og-url
Jun 6, 2026
Merged

chore(repo): normalize sln line endings and doc OG image URL#191
PatrickRitchie merged 2 commits into
TrakHound:masterfrom
ottobolyos:chore/fix-sln-crlf-and-og-url

Conversation

@ottobolyos
Copy link
Copy Markdown
Contributor

What changed

  • .gitattributes now declares *.sln text eol=crlf so Visual Studio for Windows no longer re-encodes MTConnect.NET.sln on 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.ts now derives the canonical Open Graph image URL from DOCS_CANONICAL_URL (defaulting to the GitHub Pages host for this repository). LinkedIn, Slack unfurl, and the classic X crawler require absolute https://… URLs for social-card images; the previous root-relative /logo.png was silently discarded by those crawlers and produced blank social previews. Operators deploying to a custom domain can override the default via DOCS_CANONICAL_URL at workflow level.
  • The landing-page house-style E2E test gains two StartsWith("https://") assertions for og:image and twitter:image so 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 build in docs/ — VitePress build green; og:image and twitter:image render as https://trakhound.github.io/MTConnect.NET/logo.png in the default deploy.
  • docs/scripts/generate-api-ref.sh — 0 errors, 2146 pages generated.

@ottobolyos ottobolyos force-pushed the chore/fix-sln-crlf-and-og-url branch 2 times, most recently from 323339b to 0dd1925 Compare June 6, 2026 13:24
ottobolyos added a commit to ottobolyos/mtconnect.net that referenced this pull request Jun 6, 2026
ottobolyos added a commit to ottobolyos/mtconnect.net that referenced this pull request Jun 6, 2026
ottobolyos added a commit to ottobolyos/mtconnect.net that referenced this pull request Jun 6, 2026
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.
@ottobolyos ottobolyos force-pushed the chore/fix-sln-crlf-and-og-url branch from 0dd1925 to 8c2f0f9 Compare June 6, 2026 16:54
ottobolyos added a commit to ottobolyos/mtconnect.net that referenced this pull request Jun 6, 2026
@ottobolyos ottobolyos marked this pull request as ready for review June 6, 2026 16:55
@PatrickRitchie PatrickRitchie moved this from In Progress to Ready to Merge in MTConnect.NET-Development Jun 6, 2026
@PatrickRitchie PatrickRitchie merged commit fd4c841 into TrakHound:master Jun 6, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to Merge to Done in MTConnect.NET-Development Jun 6, 2026
@ottobolyos ottobolyos deleted the chore/fix-sln-crlf-and-og-url branch June 6, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants