diff --git a/ogc/bblocks/postprocess.py b/ogc/bblocks/postprocess.py index 9ea25f7..dcfdf59 100644 --- a/ogc/bblocks/postprocess.py +++ b/ogc/bblocks/postprocess.py @@ -130,6 +130,12 @@ def do_postprocess(bblock: BuildingBlock, light: bool = False) -> bool: bblock.metadata['ldContext'] = PathOrUrl(bblock.jsonld_context).with_base_url( base_url, cwd if base_url else output_file_root ) + elif bblock.metadata.get('ldContext') and not is_url(bblock.metadata['ldContext']): + # Unprocessed JSON-LD context instead of generated from annotations + ld_context_path = bblock.files_path / bblock.metadata['ldContext'] + bblock.metadata['ldContext'] = PathOrUrl(ld_context_path).with_base_url( + base_url, cwd if base_url else output_file_root + ) if bblock.output_openapi.is_file(): bblock.metadata['sourceOpenAPIDocument'] = bblock.openapi.with_base_url( base_url, cwd if base_url else output_file_root