Skip to content

Conversation

@lhSunde
Copy link
Contributor

@lhSunde lhSunde commented Oct 24, 2025

No description provided.

@lhSunde lhSunde requested a review from toragustavsen October 24, 2025 06:27
Ensures that the `_set_prev_and_next` function correctly handles cases where the identifier is not found in the cached ID list or when the list contains a single ID, preventing errors and ensuring navigation functions correctly. It also adds a utility function `_find_identifier_index` to handle `ValueError` during index lookup.
Adds navigation links to feature 'links' array.

When features are returned, navigation URLs are appended
to the feature 'links' array. A base href is constructed
from existing 'self' or 'collection' links if available.
The navigation key is used as the link 'title', and
the rendered template becomes the 'href'.
Refactors the provider to use a generic `links` configuration
instead of a dedicated `navigation` block. This change allows
for more flexible and customizable related links between
collections, using templates for dynamic link generation.

The new `links` configuration supports translated titles and
other metadata, and the rendered links are added to the
feature's `links` array.

Also improves link handling, resolving hrefs and merging them
with existing links.
Adds the ability to specify a base URL for generated links, allowing for absolute href resolution.

This is achieved by introducing a `links_base` configuration option, which can be provided at the provider level.

The code now resolves link hrefs against this base URL, ensuring that all generated links are absolute.

This feature is particularly useful when running behind a reverse proxy or when a consistent base URL is required across different environments.
@lhSunde lhSunde closed this Oct 28, 2025
@lhSunde lhSunde deleted the feature/AddNavigation branch October 28, 2025 11:16
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