Update documentation index logic

The index generation logic for README.md now matches the
integrated documentation logic.