Mercurial > hg > nginx-site
changeset 590:05761a8e38f6
Added an option to disable generation of TOC.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 19 Jul 2012 04:56:13 +0000 |
parents | 764fbac1b8b4 |
children | b57657247299 |
files | dtd/article.dtd dtd/module.dtd xsls/body.xsls |
diffstat | 3 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dtd/article.dtd Tue Jul 17 05:02:15 2012 +0000 +++ b/dtd/article.dtd Thu Jul 19 04:56:13 2012 +0000 @@ -12,6 +12,7 @@ author CDATA #IMPLIED editor CDATA #IMPLIED translator CDATA #IMPLIED + toc (yes | no) "yes" > <!ENTITY % content SYSTEM "content.dtd" >
--- a/dtd/module.dtd Tue Jul 17 05:02:15 2012 +0000 +++ b/dtd/module.dtd Thu Jul 19 04:56:13 2012 +0000 @@ -10,6 +10,7 @@ link CDATA #REQUIRED lang CDATA #REQUIRED rev CDATA #IMPLIED + toc (yes | no) "yes" > <!ELEMENT section (directive | para)+ >
--- a/xsls/body.xsls Tue Jul 17 05:02:15 2012 +0000 +++ b/xsls/body.xsls Thu Jul 19 04:56:13 2012 +0000 @@ -39,7 +39,7 @@ <tr><td valign="top"> - X:if "section[@name]" { + X:if "@toc = 'yes' and section[@id and @name]" { <table width="100%"><tr><td align="{$INDEX_ALIGN}"> X:for-each "section[@id and @name]" { <a href="#{@id}"> !{@name} </a><br/>