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

Code samples languages #586

Closed
oleg-codaio opened this issue Jul 31, 2018 · 1 comment
Closed

Code samples languages #586

oleg-codaio opened this issue Jul 31, 2018 · 1 comment

Comments

@oleg-codaio
Copy link
Contributor

I noticed that the ReDoc docs give a list of supported languages to use for the x-code-samples blog, but in practice, the list is slightly different to get the right syntax. For instance, here it is with python:

and here's the same with Python:

The first one looks like it has the correct formatting (the second one uses "fallback" formatting), but it looks a bit sloppy to have "python" be lowercase in the sidebar. Could you possibly update the list of supported languages based on the package being used to highlight the code?

Furthermore, may I propose having a new field for each code sample like "label"? That would be useful here (would have lang: python, label: Python) and for other scenarios, say if I'd like to give to JavaScript samples, one in the browser w/fetch and one using some Node library.

Happy to send a PR out if you think that's fine, @RomanGotsiy (though you'd probably do it faster as it should be an easy change :D).

@RomanHotsiy
Copy link
Member

@vaskevich great suggestion 🙌
Thanks! Will be released in the upcoming alpha later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants