Put 'code example' formatting into its own partial template - note that due to limitations with Jekyll/Liquid, the code content to be injected into the partial template must be passed via an include variable.