nixos-render-docs: fix path for redirects.js

authored by Sizhe Zhao and committed by Valentin Gagarin ec49bcde f5a3df6a

+3 -3
+3 -3
pkgs/by-name/ni/nixos-render-docs/src/nixos_render_docs/manual.py
··· 312 313 scripts = self._html_params.scripts 314 if self._redirects: 315 - redirects_path = f'{self._base_path}/{toc.target.path.split('.html')[0]}-redirects.js' 316 - with open(redirects_path, 'w') as file: 317 file.write(self._redirects.get_redirect_script(toc.target.path)) 318 - scripts.append(redirects_path) 319 320 return "\n".join([ 321 '<?xml version="1.0" encoding="utf-8" standalone="no"?>',
··· 312 313 scripts = self._html_params.scripts 314 if self._redirects: 315 + redirects_name = f'{toc.target.path.split('.html')[0]}-redirects.js' 316 + with open(self._base_path / redirects_name, 'w') as file: 317 file.write(self._redirects.get_redirect_script(toc.target.path)) 318 + scripts.append(f'./{redirects_name}') 319 320 return "\n".join([ 321 '<?xml version="1.0" encoding="utf-8" standalone="no"?>',