Redesign of dlang.org
w0rp via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 1 13:02:11 PDT 2014
https://github.com/w0rp/new-dlang.org/blob/master/src/dlang/toc.d
I just implemented my Table of Contents idea for use in the diet
templates.
// Write a heading and add it to the table of contents in one go.
|!= h2(toc, "anchor", "Title")
// Write the table of contents out as html.
|!= toc.write("Title")
There are functions named 'h1' to 'h6' to use, and it works. Now
it should be dead simple to write headings and generate a table
of contents for a number of pages.
More information about the Digitalmars-d
mailing list