Skip to content

Share one ApiLink component across partials - #489

Open
eugenia-scandit wants to merge 1 commit into
mainfrom
feat/shared-api-link
Open

eugenia-scandit wants to merge 1 commit into
mainfrom
feat/shared-api-link

Conversation

@eugenia-scandit

Copy link
Copy Markdown
Collaborator

Six partials built API-reference links by hand: five pasted the same inline ApiLink, and the MatrixScan Pick intro built one link itself. They now import src/components/ApiLink.

The freeze rewrite in scripts/update-version.py repoints a snapshot's API links by replacing URL text, which a link built in code never contains. So docusaurus.config.ts publishes apiReferencePrefixByVersion by the version's role, the same rule the rewrite applies: the current version links the unversioned API reference, a frozen version its own . line.

  • The API-reference path segment for each framework (dotnet.ios, or none for Linux, Titanium and hosted) is a required field in the framework registry.
  • An unknown framework name, or a docs version with no prefix, fails the build instead of rendering a wrong or missing link.
  • test:api-link covers the URL builder and fails if a doc builds its own API-reference link again. It runs in CI.

The 48 pages that use these partials render the same 765 API links as the live site, and a temporary page in the 7.6.15 snapshot linked /7.6/.

Six partials built API-reference links by hand: five pasted the same inline
ApiLink, and the MatrixScan Pick intro built one link itself. They now import
src/components/ApiLink.

The freeze rewrite in scripts/update-version.py repoints a snapshot's API
links by replacing URL text, which a link built in code never contains. So
docusaurus.config.ts publishes apiReferencePrefixByVersion by the version's
role, the same rule the rewrite applies: the current version links the
unversioned API reference, a frozen version its own <major>.<minor> line.

- The API-reference path segment for each framework (dotnet.ios, or none for
  Linux, Titanium and hosted) is a required field in the framework registry.
- An unknown framework name, or a docs version with no prefix, fails the
  build instead of rendering a wrong or missing link.
- test:api-link covers the URL builder and fails if a doc builds its own
  API-reference link again. It runs in CI.

The 48 pages that use these partials render the same 765 API links as the
live site, and a temporary page in the 7.6.15 snapshot linked /7.6/.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

🚀 View preview at
https://Scandit.github.io/data-capture-documentation/pr-preview/pr-489/

Built to branch gh-pages at 2026-10-14 12:52 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

This branch has not been deployed

No deployments
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.

1 participant