migrate dynamic toc into generator template