Skip to content

Bugfix asset links#9

Merged
kampute merged 4 commits intomainfrom
bugfix_asset_links
Jan 27, 2026
Merged

Bugfix asset links#9
kampute merged 4 commits intomainfrom
bugfix_asset_links

Conversation

@kampute
Copy link
Owner

@kampute kampute commented Jan 26, 2026

This pull request improves asset URL resolution logic in the documentation routing system and enhances test coverage to verify correct behavior in various scenarios. The main changes involve refining how asset paths are resolved for file-based topics, updating related tests to reflect new path handling, and incrementing the project and test adapter versions.

Asset URL Resolution Improvements

  • Refactored the asset resolution logic in ContextAwareUrlTransformer to more robustly handle asset paths relative to the topic's directory, ensuring correct handling for both absolute and relative URLs.

Test Coverage and Accuracy

  • Updated and expanded unit tests in ContextAwareUrlTransformerTests.cs to cover scenarios where assets are located in different folders, the same folder, or do not exist, including new tests for assets in the same folder and adjustments to scope paths and expected URL results.

Dependency and Version Updates

  • Bumped the version of Kampute.DocToolkit from 2.2.0 to 2.2.1 to reflect the new changes.
  • Updated the NUnit3TestAdapter dependency in the test project to version 6.1.0 for improved test support.

Updated ResolveRelativeUrl to correctly combine the documentation scope's
RootUrl with relative asset paths, ensuring proper resolution regardless
of whether RootUrl is absolute or relative. Increased test coverage.
@kampute kampute merged commit 46c154a into main Jan 27, 2026
1 check passed
@kampute kampute deleted the bugfix_asset_links branch January 27, 2026 08:03
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