The Managing Hosts guide is now live on the Foreman and Katello documentation page. In the Managing Hosts guide, you can find instructions on how to administrate hosts, use REX and Ansible Roles, write ERB templates and etc.
Feel free to submit feedback and contribute on our foreman-documentation GitHub repository.
I merged the TOC fix, the bug in the replacement script probably lies in somewhere else. There are some rules to skip lines in some cases, maybe that’s matched.