def on_page_content(self, html, page: Page, config: Config, files: Files): repo_url = config.get("repo_url", None) edit_uri = config.get("edit_uri", None) if page.file.src_path in self._edit_paths: path = self._edit_paths.pop(page.file.src_path) if repo_url and edit_uri: page.edit_url = path and urllib.parse.urljoin( urllib.parse.urljoin(repo_url, edit_uri), path) return html