Skip to content

Conversation

@avillar
Copy link

@avillar avillar commented Dec 1, 2025

Overview

This PR enables injecting JSON-LD context into both JSON and JSON-LD Features and STAC items, without applying any modifications to the JSON-LD version. This behavior is disabled by default, and has to be specifically enabled in the linked-data configuration section.

Related Issue / discussion

Additional information

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

Copy link
Contributor

@doublebyte1 doublebyte1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this contribution! 🙏🏽 I think it is a powerful enhancement of the current Linked Data capabilities in pygeoapi; it can also leverage the existing OGC building blocks , enabling users to not reinvent the wheel and to build upon this extensive work.

I am not sure these capabilities should live side by side with the current LD capabilities in pygeoapi, which do have some degree of overlap. To have two different code bases for LD support does not seem a robust approach, and it leaves to the users the burden to decide which one to use through a configuration flag.

If this would be to replace the existing approach, creating structured metadata for SEO would be one of the use cases. Would it be possible to use the inject_verbatim to generate the relevant information to be consumed by Search engine crawlers, providing a rich version of the webpage?

I am also not convinced that we should use JSON-LD in both JSON and JSON-LD encodings, even if it we are injecting a single tag; this may seem confusing to the users, and IMHO it breaks the content negotiation promise.

I think this PR deserves an issue to discuss the LD capabilities in pygeoapi, and I created one here: #2176

Looking forward to continue the discussion there.

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