Skip to content

Commit

Permalink
docs: add redirect from the previous options.html
Browse files Browse the repository at this point in the history
After migrating to nixos-render-docs, the extension move to .xtml.
Unfortunately, this broke links to the previous Options Page.

This patch provides a basic redirect support to the new Options Page.
  • Loading branch information
marsam authored Jun 9, 2024
1 parent 8f1b183 commit 8bdb74e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/home-manager-manual.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ in stdenv.mkDerivation {
OPTIONS_JSON \
${home-manager-options.nix-darwin}/share/doc/nixos/options.json
cp ${./options.html} out/options.html
cp ${./static/style.css} out/style.css
cp -r ${./release-notes} release-notes
Expand Down
15 changes: 15 additions & 0 deletions docs/options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Redirecting&hellip;</title>
<meta charset="utf-8">
<link rel="canonical" href="options.xhtml">
<noscript><meta http-equiv="refresh" content="0; url=options.xhtml"></noscript>
</head>
<body>
<h1>Redirecting&hellip;</h1>
<script>
window.location.href = "options.xhtml" + (window.location.search || "") + (window.location.hash || "");
</script>
</body>
</html>

0 comments on commit 8bdb74e

Please sign in to comment.