generates a table of contents for pelican articles and pages