Skip to content

Commit

Permalink
docs: fix 404 styling (#18094)
Browse files Browse the repository at this point in the history
* docs: fix 404 styling

Signed-off-by: Michael Crenshaw <[email protected]>

* hack around custom tag destruction

Signed-off-by: Michael Crenshaw <[email protected]>

---------

Signed-off-by: Michael Crenshaw <[email protected]>
  • Loading branch information
crenshaw-dev authored May 7, 2024
1 parent 2cb08f5 commit 9210b26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hack/gen-docs/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"bytes"
"fmt"
"log"
"os"
Expand Down Expand Up @@ -61,6 +62,11 @@ func updateMkDocsNav(parent string, child string, subchild string, files []strin
if err != nil {
return err
}

// The marshaller drops custom tags, so re-add this one. Turns out this is much less invasive than trying to handle
// it at the YAML parser level.
newmkdocs = bytes.Replace(newmkdocs, []byte("site_url: READTHEDOCS_CANONICAL_URL"), []byte("site_url: !ENV READTHEDOCS_CANONICAL_URL"), 1)

return os.WriteFile("mkdocs.yml", newmkdocs, 0644)
}

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ nav:
- Blog ⧉: https://blog.argoproj.io/
repo_url: https://github.com/argoproj/argo-cd
site_name: Argo CD - Declarative GitOps CD for Kubernetes
site_url: !ENV READTHEDOCS_CANONICAL_URL
strict: true
theme:
custom_dir: overrides
Expand Down

0 comments on commit 9210b26

Please sign in to comment.