Add a code snippet to doc homepage

Closes #62