(files, config, **kwargs)
| 59 | |
| 60 | |
| 61 | def on_files(files, config, **kwargs): |
| 62 | global url_map |
| 63 | |
| 64 | # Build API documentation |
| 65 | nedoc_config = load_nedoc_config(config) |
| 66 | |
| 67 | build_dir = Path(config["site_dir"]) |
| 68 | target_dir = build_dir / PYTHON_API_DIR |
| 69 | |
| 70 | os.makedirs(target_dir, exist_ok=True) |
| 71 | build_nedoc(nedoc_config, target_dir) |
| 72 | |
| 73 | print(f"Generated API documentation into {target_dir}, it will be available at {site_url}") |
| 74 | |
| 75 | # Load URL map |
| 76 | map_file = target_dir / "map.json" |
| 77 | |
| 78 | if os.path.isfile(map_file): |
| 79 | with open(map_file) as f: |
| 80 | url_map = json.load(f) |
| 81 | else: |
| 82 | logging.warning(f"WARNING: {map_file} file is missing") |
| 83 | |
| 84 | |
| 85 | def on_page_markdown(markdown: str, page, config, *args, **kwargs): |
nothing calls this directly
no test coverage detected