redux-toolkit icon indicating copy to clipboard operation
redux-toolkit copied to clipboard

File extension doesn't change in the docs according to the selected language

Open imrishabh18 opened this issue 3 years ago • 3 comments

  • The Quick Start docs page doesn't change the file extension from js to ts on selection.

https://user-images.githubusercontent.com/38923768/187497604-4e0e0626-cda8-45f9-9c5a-b34bcb56f60d.mov

imrishabh18 avatar Aug 30 '22 17:08 imrishabh18

I would like to make a PR to resolve this issue.

imrishabh18 avatar Aug 30 '22 17:08 imrishabh18

I'm actually not sure there's anything we can do about this, tbh. If you look at the markdown, that filename is directly written as part of the codeblock metadata.

If you can figure out a way to do it, great, but I'm honestly not sure the Docusaurus docs tool will let us change that dynamically.

markerikson avatar Aug 30 '22 17:08 markerikson

I am not that familiar with Docusaurus, tbh. I was going through the typescript.md file and thought there might be a way to show these codeblocks with the correct title on the docs page.

I even tried to find some Docusaurus plugins to dynamically change the title of the codeblock, but couldn’t find any.

Anyways, if you have directions where I can look into to resolve this, would be happy too.

imrishabh18 avatar Aug 30 '22 18:08 imrishabh18