-
Notifications
You must be signed in to change notification settings - Fork 23
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
Toggle lang button #70
Comments
Related iterative/dvc.org#759 - I hope it can be solved for both with a single solution. |
though should be noted that iterative/dvc.org#759 is specifically about code snippets, whereas #70 includes text & general markdown |
About interface options: given that we're probably going to serve static content, wouldn't it be better to keep it simple and use path components instead of GET parameters? Exempli gratia: cml.dev/doc/start/gitlab#usage like in developers.google.com/docs/api/quickstart/nodejs#further_reading |
the example you link ( |
Any word on this? Would be a super helpful feature for CML docs! |
See e.g. https://github.com/iterative/shtab/raw/docs/docs/index.md ➡️ https://docs.iterative.ai/shtab/ === "GitHub"
*bla bla* standard markdown...
```yml
- uses: iterative/setup-cml@v1
```
=== "GitLab"
... |
Looking at our doc engine, I think this is possible! |
A couple questions about this task:
|
|
|
As far as I can tell, we can't use |
Well, if we're going to add many dynamic sections and all of them need to be synchronized to the user choice, having some sort of global switch/dropdown doesn't seem that crazy (?) If we choose to offer a tabbed interface for each dynamic section, we would need to synchronize them so users don't have to repeat their choices each time they hit one of these blocks. |
tabbed
General notesAlso for CML, we have loads of options: |
I decided to go ahead and use html tags for now and look into creating a gatsby plugin for using the Markdown for tabs:
tabs in action: Screen.Recording.2021-09-24.at.9.13.17.PM.mov |
Related: iterative/dvc.org#759 |
Rather than writing separate pages for GH, GL and BB, it would in many cases be easier to write one page with a button to toggle between providers (similar to https://github.com/iterative/cml-website/blob/master/content/index.mdx but far simpler).
See e.g. https://zguide.zeromq.org/docs/chapter1/ for an example of clicking on a language next to code snippets to change the language of all snippets on the page (ofc we can do a lot better design-wise).
md interface options
html tags
tabbed
https://facelessuser.github.io/pymdown-extensions/extensions/tabbed/
other ideas?
URL interface options
/CC @iterative/cml @julieg18 @rogermparent
The text was updated successfully, but these errors were encountered: