Skip to content

locale-specific API docs? #317

Closed Answered by rohit-gohri
alexakreizinger asked this question in Q&A
Discussion options

You must be logged in to vote

my question for this approach is whether it's possible to create a standalone page and manually import the corresponding OpenAPI spec for that page, but have the output look more like the auto-imported docs.

This is definitely possible if you create a react page, this is the output - https://redocusaurus.vercel.app/examples/custom-page/
And this is the source file - https://github.com/rohit-gohri/redocusaurus/blob/main/website/src/pages/examples/custom-page/index.jsx

I think you can make this page dynamic and load the correct yaml using docusaurus context ( https://docusaurus.io/docs/docusaurus-core#useDocusaurusContext )

const {i18n} = useDocusaurusContext();
const locale = i18n.curren…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by alexakreizinger
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@alexakreizinger
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants