Skip to content

Commit

Permalink
Turn shaclRules into full URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Aug 25, 2023
1 parent 440ba4f commit 290e495
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ogc/bblocks/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import datetime
from pathlib import Path
import traceback
from urllib.parse import urljoin

from ogc.na.util import is_url

Expand Down Expand Up @@ -123,6 +124,10 @@ def do_postprocess(bblock: BuildingBlock) -> bool:
if base_url and path:
snippet['url'] = f"{base_url}{path}"

if base_url:
if bblock.shaclRules:
bblock.metadata['shaclRules'] = [urljoin(bblock.metadata['sourceFiles'], s) for s in bblock.shaclRules]

print(f" > Generating documentation for {bblock.identifier}", file=sys.stderr)
doc_generator.generate_doc(bblock)
return True
Expand Down

0 comments on commit 290e495

Please sign in to comment.