No release in over a year
CommonMark generator for Jekyll that adds tabbed code functionality
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 4.2, < 5.0

Runtime

 Project Readme

jdvp-codetabs-commonmark

Gem Version

This Jekyll plugin is an extension of jekyll-commonmark-ghpages that adds one extra feature: the ability to use tabbed code blocks. The tabbed code blocks also have theme support and support copying code blocks. See Testing Code Tabs for a demo!

Please note that this plugin will not work out of the box with GitHub Pages which only officially supports these plugins. I made a guide last year about getting around this using GitHub Actions, but it may be a bit dated even if the idea is still the same. My site itself is generated using GitHub Actions so it can be done for sure with the right configuration.

Installation

Add the jdvp-codetabs-commonmark gem inside of your Gemfile:

group :jekyll_plugins do
  gem 'jdvp-codetabs-commonmark'
end

Update _config.yml to use this plugin as the markdown converter:

markdown: JdvpCodeTabsCommonMark

Since this project extends the existing jekyll-commonmark-ghpages, you can specify extensions and options for the markdown conversion as seen in that project's README.

If necessary, run bundle install to install the missing gem:

bundle install

Demo

Please see the following article that demos the features of this plugin: Testing Code Tabs. I will keep it as up-to-date as I can.