Adds hooks to Docs templates. Fixes #298