Any Jekyll pros out there?

I’m wondering if there’s a good way to make variants of the same page and allow users to switch between them.

Like when Apple’s docs let you switch between Objective-C and Swift examples. Most of the text is the same here.