Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix 404 styling (cherry-pick #18094) #18107

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -211,6 +211,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
Loading