Jjagg / MonoGame-docfx

Documentation of MonoGame ported to docfx. Built from https://github.com/Jjagg/MonoGame/tree/docs-fresh
https://jjagg.github.io/MonoGame-docfx/manual/index.html
0 stars 0 forks source link

VB and F# syntax #4

Open Jjagg opened 6 years ago

Jjagg commented 6 years ago

From @Jjagg on December 11, 2017 16:20

Syntax section in API reference looks like this: image

In the current docs it looks like this: image

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

Jjagg commented 6 years ago

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. image