Modify document template and render markdown