Add folds to the document.

On switching templates it does not yet update properly, but this should be a good place to start.