public
Description: A lightweight and flexible website management system.
Homepage: http://webby.rubyforge.org/
Clone URL: git://github.com/TwP/webby.git
Search Repo:
Updating documentation about the outline filter
TwP (author)
Sat May 03 18:52:31 -0700 2008
commit  c36b3645e907513e3620dd50bf71b80736db547b
tree    af6533bee97cebb33596aa2856f87ff9c0537c79
parent  c2d0a3b3a51b91c8674e1cda401fc692ab0a13fa
...
338
339
340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
342
343
...
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
0
@@ -338,6 +338,20 @@
0
 The @haml@ gem must be installed on your system in order to use the haml filter or the sass filter.
0
 </div>
0
 
0
+h3. Outline
0
+
0
+The Outline filter is used to insert outline numbering into HTML heading tags (h1, h2, h3, etc.) and to generate a table of contents based on the heading tags. The table of contents is inserted into the page at the location of the @<toc />@ tag. If there is no @<toc />@ tag, then a table of contents will not be created but outline numbering will still take place.
0
+
0
+If a table of contents is desired without outline numbers being inserted into the heading tags, this can be specified in the attibutes of the @<toc />@ tag itself.
0
+
0
+<pre>
0
+<toc numbering="off" />
0
+</pre>
0
+
0
+This will generate a table of contents, but not insert outline numbering into the heading tags. The full list of "TOC attributes":/rdoc/classes/Webby/Filters/Outline.html can be found in the source documentation.
0
+
0
+The Outline filter will only work on valid HTML or XHTML pages. Therefore it should be used after any markup langauge filters (textile, markdown, etc.).
0
+
0
 h3. BasePath
0
 
0
 The basepath filter is used to rewrite the base path location for all URLs in a page. This is useful for the times when the publish location of the website is no at the root of the web server -- @http://your.website.com/path/to/your/site@ for example. This allows pages and resources (images, javascript, stylesheets, etc.) to be referenced from the root of the Webby web server for easy development, but the paths of these resources can easily be changed by the basepath filter when the website is being deployed.
...
22
23
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
26
27
...
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
0
@@ -22,6 +22,49 @@
0
 # it should be used after any markup langauge filters (textile, markdown,
0
 # etc.).
0
 #
0
+# The following attributes can be specified in the <toc /> tag itself to
0
+# control how outline numbering is performed by the filter. The attributes
0
+# can be used in combination with one another.
0
+#
0
+# === numbering
0
+#
0
+# If set to "off", this will prevent numbers from being inserted into the
0
+# page. The default is "on".
0
+#
0
+# <toc numbering="off" />
0
+#
0
+# === numbering_start
0
+#
0
+# This is the number to start with when inserting outline numbers into a
0
+# page. The default is 1.
0
+#
0
+# <toc numbering_start="3" />
0
+#
0
+# === toc_style
0
+#
0
+# The style of the Table of Contents list to generated. This will be
0
+# either "ol" for an ordered list or "ul" for an unordered list. The
0
+# default is an ordered list.
0
+#
0
+# <toc toc_style="ul" />
0
+#
0
+# === toc_range
0
+#
0
+# This limits the numbering to only a subset of the HTML heading tags. The
0
+# defaul is to number all the heading tags.
0
+#
0
+# <toc toc_range="h1-h3" />
0
+#
0
+# In this example, only the heading tags h1, h2, and h3 will be numbered
0
+# and included in the table of contents listing.
0
+#
0
+# ==== Example
0
+#
0
+# Generate a table of contents using an unordered list, starting with the
0
+# number 2, and only numbering heading levels 2, 3, and 4.
0
+#
0
+# <toc numbering_start="2" toc_style="ul" toc_range="h2-h4" />
0
+#
0
 class Outline
0
   include ERB::Util
0
 

Comments

    No one has commented yet.