-
Notifications
You must be signed in to change notification settings - Fork 6
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
Self host redoc #284
base: main
Are you sure you want to change the base?
Self host redoc #284
Conversation
19d35cd
to
55b5300
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, a few more things just caught my eye.
Signed-off-by: Sekiranda <[email protected]>
Signed-off-by: Sekiranda <[email protected]>
Signed-off-by: Sekiranda <[email protected]>
42a1597
to
af3e612
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Zanda256 looking good! Let's add the SHA256 checksum explicitly to the pull tool as a command line argument and we'll record it the first time we download it in the go:generate command.
@@ -44,5 +46,10 @@ func (w writer) Write(ctx context.Context) error { | |||
if err := w.storage.WriteFile(ctx, "index.html", indexHTML); err != nil { | |||
return err | |||
} | |||
|
|||
if err := w.storage.WriteFile(ctx, "redoc.standalone.js", reDocScriptFile); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also write record.standalone.js.LICENSE.txt
here.
} | ||
|
||
// Pull ReDoc LICENSE file | ||
licenseFileURL := "https://raw.githubusercontent.com/Redocly/redoc/refs/heads/main/LICENSE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should pull from https://cdn.redoc.ly/redoc/VERSION/bundles/redoc.standalone.js.LICENSE.txt, not from the Git repo as it may change over versions.
Signed-off-by: Sekiranda <[email protected]>
With this change, we download and host the latest Redoc script every time we generate a backend.
Resolves #38
Checklist