Skip to content

Commit

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



* hack around custom tag destruction



---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
  • Loading branch information
gcp-cherry-pick-bot[bot] and crenshaw-dev committed May 7, 2024
1 parent 2cb08f5 commit d774c42
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 d774c42

Please sign in to comment.