consolidate docs/metrics building to remove duplication