Should we have tabs to switch language syntax? I'm not sure it adds much value.
That said, Docfx does have a cool feature we can use here. To have tabbed content, you use links of the form #tab/{tabid}. You can let different tab groups have the same id sets to link them together so if a user selects a tab in one group, the tab with the same id is selected for all tab groups with the same id sets. We can use #tab/cs, #tab/fs and #tab/vb for all syntax and declaration tab groups to take advantage of this feature. If users select F# on one tab group, all tab groups on the page will display F# syntax.
The dotnet API reference has a great solution for this. They just have a combobox in the affix to select the language. It's also remembered across pages.
From @Jjagg on December 11, 2017 16:20
Syntax section in API reference looks like this:
In the current docs it looks like this:
Should we have tabs to switch language syntax? I'm not sure it adds much value.
That said, Docfx does have a cool feature we can use here. To have tabbed content, you use links of the form
#tab/{tabid}
. You can let different tab groups have the same id sets to link them together so if a user selects a tab in one group, the tab with the same id is selected for all tab groups with the same id sets. We can use#tab/cs
,#tab/fs
and#tab/vb
for all syntax and declaration tab groups to take advantage of this feature. If users select F# on one tab group, all tab groups on the page will display F# syntax.Copied from original issue: Jjagg/MonoGame#4