Skip to content

Commit

Permalink
fix(mkdocs): fix Files append in intakes_by_uuid plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromefellus-sekoia committed Sep 23, 2024
1 parent afca467 commit 269c429
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions plugins/intakes_by_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def on_files(self, files: Files, config: Config):
with filename.open() as f:
_, metadata = get_data(f.read())

if "uuid" not in metadata or metadata.get("type").lower() != "intake":
if "uuid" not in metadata or metadata.get("type").lower() != "intake":
continue

dialect_uuid = metadata["uuid"]
Expand All @@ -67,13 +67,16 @@ def on_files(self, files: Files, config: Config):
)
new_files.append(newfile)

new_files.append(File(
path="integration/categories/index.md",
src_dir="operation_center/integration_catalog/",
dest_dir=config["site_dir"],
use_directory_urls=True,
))
files._files += new_files
new_files.append(
File(
path="integration/categories/index.md",
src_dir="operation_center/integration_catalog/",
dest_dir=config["site_dir"],
use_directory_urls=True,
)
)
for f in new_files:
files.append(f)

def on_page_read_source(self, page, config):
if page.file.src_path.startswith("operation_center/integration_catalog/uuid/"):
Expand Down

0 comments on commit 269c429

Please sign in to comment.