(crate_name: str, crate_dir: Path, html_path: Path)
| 176 | |
| 177 | |
| 178 | def _url_relative(crate_name: str, crate_dir: Path, html_path: Path) -> Path: |
| 179 | crate_slug = _crate_slug(crate_name) |
| 180 | rel = html_path.relative_to(crate_dir) |
| 181 | parent_parts = [_rustdoc_path_part(part) for part in rel.parent.parts] |
| 182 | if rel.name == "index.html": |
| 183 | return Path(crate_slug, *parent_parts, "index.mdx") |
| 184 | stem = rel.name.removesuffix(".html") |
| 185 | return Path(crate_slug, *parent_parts, f"{_slug_part(stem)}.mdx") |
| 186 | |
| 187 | |
| 188 | def _page_url(output_rel: Path) -> str: |
no test coverage detected