mkdocs for material comes with a new copy code button that makes it easy to copy code such as those given in the example job scripts page here.
Achieving this requires just a simple yaml config update as per their docs here (not sure from which version of mkdocs was that feature incorporated).