Replies: 1 comment 7 replies
-
If we were to do anything like this, we would most likely do this in the new block tab format: https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/tab/. While we haven't stopped back porting some features to the I imagine we would not implement multiple approaches to reusing content, but instead implement one explicit way that works in all cases. So instead of back filling content to empty tabs and having ways to explicitly define where to copy content from, we would likely only implement the latter (demonstrating with new format):
This approach would require the content to be declared before it is referenced. This is just me thinking out loud. If we did this, the approach would of course be subject to changes, but I think this is likely the direction I would initially be interested in trying. |
Beta Was this translation helpful? Give feedback.
-
cf. squidfunk/mkdocs-material#5702 (comment)
I think it would be nice to be able to share the same content between multiple tabs without duplication. E.g., instead of:
where "foo" is duplicated, have a syntax to re-use "foo". While I can group tabs manually, e.g.:
this doesn't work well with linked tabs, possibly requires re-ordering, and is visually different (one tab instead of two).
It would be great if it was possible to have some syntax for re-using the content across tabs, for example:
or
to generate three tabs (A, B, and C) where A and B have content "foo" and C has content "bar".
Personally I would prefer the latter as the former still requires re-ordering of the tabs, but anything that makes three distinct visual tabs while re-using the description between two works for me.
Context: I am writing documentation that can have different instruction for different operating systems, and I will use (linked) tabs to make it easy to navigate. However, frequently I find myself documenting the same steps for MacOS and Linux. It would help a lot with maintenance if this content only has to be written (or edited) once.
Beta Was this translation helpful? Give feedback.
All reactions