-
Notifications
You must be signed in to change notification settings - Fork 216
Make apireference layout generic #1712
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
base: main
Are you sure you want to change the base?
Conversation
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.
LGTM.
layouts/_default/apireference.html
Outdated
@@ -2,7 +2,7 @@ | |||
<html> | |||
|
|||
<head> | |||
<title>Redis Cloud API</title> | |||
<title>{{ .Title }}</title> | |||
{{ partial "scss.html" (dict "path" "scss/style.scss") }} | |||
{{ partial "css.html" (dict "path" "css/index.css") }} | |||
{{ $relref := printf "%s%s" .Site.BaseURL "operate/rc/api/" }} |
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.
We'll have to inject the baseurl dynamically as well
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.
I think I fixed that in fbaecdb, let me know what you think.
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.
Looks good.
…API to use the generic api layout
I think it would make sense to remove |
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.
Looks good. J'approve!
Was playing around with the Langcache OpenAPI spec to see if it could work with the apireference layout, and I was able to make a few changes to the layout to make it generic. Now, all you need is an OpenAPI spec (YAML or JSON) to get the same layout as the Redis Cloud API docs.
Here's what the filestructure should look like to use the apireference layout:
Here's what
api-reference.md
should look like: