docubot 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/bin/docubot +125 -125
  2. data/lib/docubot.rb +43 -43
  3. data/lib/docubot/bundle.rb +182 -182
  4. data/lib/docubot/converter.rb +28 -28
  5. data/lib/docubot/converters/haml.rb +9 -9
  6. data/lib/docubot/converters/markdown.rb +14 -14
  7. data/lib/docubot/index.rb +67 -67
  8. data/lib/docubot/link_tree.rb +111 -111
  9. data/lib/docubot/metasection.rb +61 -61
  10. data/lib/docubot/page.rb +167 -167
  11. data/lib/docubot/shells/default/0_License.md +59 -59
  12. data/lib/docubot/shells/default/Appendix/Glossary.md +4 -4
  13. data/lib/docubot/shells/default/Appendix/Index_Page.md +8 -8
  14. data/lib/docubot/shells/default/Appendix/Table of Contents.md +4 -4
  15. data/lib/docubot/shells/docubot-help/0_License.md +20 -20
  16. data/lib/docubot/shells/docubot-help/1_Getting_Started.md +47 -47
  17. data/lib/docubot/shells/docubot-help/2_Basic_Concepts/4 Adding Images.md +1 -1
  18. data/lib/docubot/shells/docubot-help/2_Basic_Concepts/index.md +5 -5
  19. data/lib/docubot/shells/docubot-help/3_Advanced_Topics/Controlling Glossary.md +2 -2
  20. data/lib/docubot/shells/docubot-help/3_Advanced_Topics/Controlling Indexing.md +9 -9
  21. data/lib/docubot/shells/docubot-help/3_Advanced_Topics/Controlling the Table of Contents.md +5 -5
  22. data/lib/docubot/shells/docubot-help/4_Appendix/Glossary.md +4 -4
  23. data/lib/docubot/shells/docubot-help/4_Appendix/Index_Page.md +5 -5
  24. data/lib/docubot/shells/docubot-help/4_Appendix/Table of Contents.md +7 -7
  25. data/lib/docubot/shells/docubot-help/index.txt +7 -7
  26. data/lib/docubot/snippet.rb +19 -19
  27. data/lib/docubot/snippets/glossary.rb +7 -7
  28. data/lib/docubot/snippets/index_entries.rb +6 -6
  29. data/lib/docubot/templates/_root/glossary.css +3 -3
  30. data/lib/docubot/templates/_root/glossary.js +57 -57
  31. data/lib/docubot/templates/index.haml +14 -14
  32. data/lib/docubot/templates/toc.haml +2 -2
  33. data/lib/docubot/templates/top.haml +32 -32
  34. data/lib/docubot/writers/chm/hhc.erb +1 -1
  35. data/lib/docubot/writers/chm/hhk.erb +2 -2
  36. data/lib/docubot/writers/html.rb +87 -87
  37. data/spec/_all.rb +12 -12
  38. data/spec/_helper.rb +16 -16
  39. data/spec/bundle.rb +339 -339
  40. data/spec/command.rb +3 -3
  41. data/spec/converters.rb +2 -2
  42. data/spec/global.rb +27 -27
  43. data/spec/glossary.rb +94 -94
  44. data/spec/index.rb +2 -2
  45. data/spec/page.rb +80 -80
  46. data/spec/samples/attributes/defaults.haml +34 -34
  47. data/spec/samples/attributes/explicit1.haml +42 -42
  48. data/spec/samples/attributes/explicit2.haml +41 -41
  49. data/spec/samples/attributes/hidden.haml +39 -39
  50. data/spec/samples/attributes/index.md +8 -8
  51. data/spec/samples/collisions/page1.md +2 -2
  52. data/spec/samples/collisions/page1.textile +2 -2
  53. data/spec/samples/collisions/page2.haml +3 -3
  54. data/spec/samples/collisions/page2.html +2 -2
  55. data/spec/samples/collisions/page2.txt +2 -2
  56. data/spec/samples/collisions/page3.md +2 -2
  57. data/spec/samples/files/index.md +1 -1
  58. data/spec/samples/glossary/Glossary.txt +4 -4
  59. data/spec/samples/glossary/Some Page.md +2 -2
  60. data/spec/samples/glossary/_glossary/Simple Term.md +2 -2
  61. data/spec/samples/glossary/_glossary/complex.haml +8 -8
  62. data/spec/samples/glossary/_glossary/project_x.md +3 -3
  63. data/spec/samples/hierarchy/1/1.1/1.1.1/index.haml +1 -1
  64. data/spec/samples/hierarchy/1/1.1/1.1.1/page.haml +3 -3
  65. data/spec/samples/hierarchy/1/1.1/page.haml +3 -3
  66. data/spec/samples/hierarchy/1/page.haml +3 -3
  67. data/spec/samples/hierarchy/2/2.1/2.1.1/page.haml +3 -3
  68. data/spec/samples/hierarchy/2/2.1/index.haml +1 -1
  69. data/spec/samples/hierarchy/2/2.1/page.haml +3 -3
  70. data/spec/samples/hierarchy/2/page.haml +3 -3
  71. data/spec/samples/hierarchy/main.haml +1 -1
  72. data/spec/samples/hierarchy/toc.md +1 -1
  73. data/spec/samples/links/index.txt +11 -11
  74. data/spec/samples/links/root.md +13 -13
  75. data/spec/samples/links/sub1/inner1.md +11 -11
  76. data/spec/samples/links/sub2.md +4 -4
  77. data/spec/samples/links/sub2/inner2.md +7 -7
  78. data/spec/samples/simplest/HTML.html +9 -9
  79. data/spec/samples/simplest/Haml.haml +12 -12
  80. data/spec/samples/simplest/Markdown.md +9 -9
  81. data/spec/samples/simplest/Text.txt +9 -9
  82. data/spec/samples/simplest/Textile.textile +9 -9
  83. data/spec/samples/templates/_templates/doubler.haml +6 -6
  84. data/spec/samples/templates/_templates/page.haml +1 -1
  85. data/spec/samples/templates/goaway.txt +2 -2
  86. data/spec/samples/templates/onepara_html.html +2 -2
  87. data/spec/samples/templates/onepara_md.md +4 -4
  88. data/spec/samples/templates/twopara_haml.haml +6 -6
  89. data/spec/samples/templates/twopara_textile.textile +5 -5
  90. data/spec/samples/titles/3_renamed.txt +1 -1
  91. data/spec/samples/titles/index.txt +1 -1
  92. data/spec/templates.rb +43 -43
  93. data/spec/toc.rb +128 -128
  94. data/spec/writer/chm.rb +2 -2
  95. data/spec/writer/html.rb +2 -2
  96. metadata +56 -25
  97. data/bin/docubot.bat +0 -1
@@ -1,60 +1,60 @@
1
- This is a simple, no-frills [Markdown](http://daringfireball.net/projects/markdown/basics) file.
2
- (This waiver is from [Via Ferrata](http://www.nelsonrocks.org/)'s waiver package, with a few
3
- additional stylistic modifications to show Markdown.)
4
-
5
- **Nelson Rocks Preserve** is covered in steep terrain with loose, slippery and unstable footing.
6
- The weather can make matters worse. Sheer drops are everywhere. You may fall, be injured or die.
7
- There are hidden holes. You could break your leg. There are wild animals, which may be vicious,
8
- poisonous or carriers of deadly diseases. These include poisonous snakes and insects. Plants can
9
- be poisonous as well.
10
-
11
- _Real dangers are present even on trails._ Trails are not sidewalks. They can be, and are,
12
- steep, slippery and dangerous. Trail features made or enhanced by humans, such as steps, walls
13
- and railings (if any) can break, collapse, or otherwise fail catastrophically at any time.
14
-
15
- * Stay on the trails whenever possible. The terrain, in addition to being dangerous, is
16
- surprisingly complex. You may get lost. Carry food, water and first aid supplies at all times.
17
- * Rocks and other objects can fall from the cliffs. They can tumble down slopes. This can happen
18
- naturally, or be caused by people above you, such as climbers. Rocks of all sizes, including
19
- huge boulders, can shift, move or fall with no warning. Use of helmets is advised for anyone
20
- approaching the rock formations. They can be purchased or rented at Seneca Rocks. They won't
21
- save you if you get hit by something big or on another part of your body.
22
- * Weather can be dangerous, regardless of the forecast. Be prepared with extra clothing, including
23
- rain gear.
24
- * Please know that scrambling in high places (scrambling is moving over terrain steep enough to
25
- use your hands) without proper experience, training and equipment, or allowing children to do so
26
- is dangerous.
27
-
28
- The Preserve does not provide rangers or security personnel. The other people in the preserve,
29
- including other visitors, our employees, agents, and guests, and anyone else who might sneak in,
30
- may be stupid, reckless, or otherwise dangerous. They may be mentally ill, criminally insane,
31
- drunk, using illegal drugs and/or armed with deadly weapons and ready to use them. We aren't
32
- necessarily going to do anything about it. We refuse to take responsibility.
33
-
34
- If you climb, you may die or be seriously injured. This is true whether you are experienced or
35
- not, trained or not, equipped or not, though training and equipment may help. It's a fact,
36
- climbing is extremely dangerous. If you don't like it, stay at home. You really shouldn't be
37
- doing it anyway. We do not provide supervision or instruction. We are not responsible for, and
38
- do not inspect or maintain, climbing anchors (including bolts, pitons, slings, trees, etc.) As
39
- far as we know, any of them can and will fail and send you plunging to your death. There are
40
- countless tons of loose rock ready to be dislodged and fall on you or someone else. There are
41
- any number of extremely and unusually dangerous conditions existing on and around the rocks, and
42
- elsewhere on the property. We may or may not know about any specific hazard, but even if we do,
43
- don't expect us to try to warn you. You're on your own.
44
-
45
- Rescue services are not provided by the Preserve, and may not be available quickly or at all.
46
- Local rescue squads may not be equipped for or trained in mountain rescue. If you are lucky
47
- enough to have somebody try to rescue you or treat your injuries, they may be incompetent or
48
- worse. This includes doctors and hospitals. We assume no responsibility. Also, if you decide to
49
- participate in a rescue of some other unfortunate, that's your choice. Don't do it unless you
50
- are willing to assume all risks.
51
-
52
- By entering the Preserve, you are agreeing that we owe you no duty of care or any other duty. We
53
- promise you nothing. We do not and will not even try to keep the premises safe for any purpose.
54
- The premises are not safe for any purpose. This is no joke. We won't even try to warn you about
55
- any dangerous or hazardous condition, whether we know about it or not. If we do decide to warn
56
- you about something, that doesn't mean we will try to warn you about anything else. If we do
57
- make an effort to fix an unsafe condition, we may not try to correct any others, and we may make
58
- matters worse! We and our employees or agents may do things that are unwise and dangerous.
59
- Sorry, we're not responsible. We may give you bad advice. Don't listen to us. In short, ENTER
1
+ This is a simple, no-frills [Markdown](http://daringfireball.net/projects/markdown/basics) file.
2
+ (This waiver is from [Via Ferrata](http://www.nelsonrocks.org/)'s waiver package, with a few
3
+ additional stylistic modifications to show Markdown.)
4
+
5
+ **Nelson Rocks Preserve** is covered in steep terrain with loose, slippery and unstable footing.
6
+ The weather can make matters worse. Sheer drops are everywhere. You may fall, be injured or die.
7
+ There are hidden holes. You could break your leg. There are wild animals, which may be vicious,
8
+ poisonous or carriers of deadly diseases. These include poisonous snakes and insects. Plants can
9
+ be poisonous as well.
10
+
11
+ _Real dangers are present even on trails._ Trails are not sidewalks. They can be, and are,
12
+ steep, slippery and dangerous. Trail features made or enhanced by humans, such as steps, walls
13
+ and railings (if any) can break, collapse, or otherwise fail catastrophically at any time.
14
+
15
+ * Stay on the trails whenever possible. The terrain, in addition to being dangerous, is
16
+ surprisingly complex. You may get lost. Carry food, water and first aid supplies at all times.
17
+ * Rocks and other objects can fall from the cliffs. They can tumble down slopes. This can happen
18
+ naturally, or be caused by people above you, such as climbers. Rocks of all sizes, including
19
+ huge boulders, can shift, move or fall with no warning. Use of helmets is advised for anyone
20
+ approaching the rock formations. They can be purchased or rented at Seneca Rocks. They won't
21
+ save you if you get hit by something big or on another part of your body.
22
+ * Weather can be dangerous, regardless of the forecast. Be prepared with extra clothing, including
23
+ rain gear.
24
+ * Please know that scrambling in high places (scrambling is moving over terrain steep enough to
25
+ use your hands) without proper experience, training and equipment, or allowing children to do so
26
+ is dangerous.
27
+
28
+ The Preserve does not provide rangers or security personnel. The other people in the preserve,
29
+ including other visitors, our employees, agents, and guests, and anyone else who might sneak in,
30
+ may be stupid, reckless, or otherwise dangerous. They may be mentally ill, criminally insane,
31
+ drunk, using illegal drugs and/or armed with deadly weapons and ready to use them. We aren't
32
+ necessarily going to do anything about it. We refuse to take responsibility.
33
+
34
+ If you climb, you may die or be seriously injured. This is true whether you are experienced or
35
+ not, trained or not, equipped or not, though training and equipment may help. It's a fact,
36
+ climbing is extremely dangerous. If you don't like it, stay at home. You really shouldn't be
37
+ doing it anyway. We do not provide supervision or instruction. We are not responsible for, and
38
+ do not inspect or maintain, climbing anchors (including bolts, pitons, slings, trees, etc.) As
39
+ far as we know, any of them can and will fail and send you plunging to your death. There are
40
+ countless tons of loose rock ready to be dislodged and fall on you or someone else. There are
41
+ any number of extremely and unusually dangerous conditions existing on and around the rocks, and
42
+ elsewhere on the property. We may or may not know about any specific hazard, but even if we do,
43
+ don't expect us to try to warn you. You're on your own.
44
+
45
+ Rescue services are not provided by the Preserve, and may not be available quickly or at all.
46
+ Local rescue squads may not be equipped for or trained in mountain rescue. If you are lucky
47
+ enough to have somebody try to rescue you or treat your injuries, they may be incompetent or
48
+ worse. This includes doctors and hospitals. We assume no responsibility. Also, if you decide to
49
+ participate in a rescue of some other unfortunate, that's your choice. Don't do it unless you
50
+ are willing to assume all risks.
51
+
52
+ By entering the Preserve, you are agreeing that we owe you no duty of care or any other duty. We
53
+ promise you nothing. We do not and will not even try to keep the premises safe for any purpose.
54
+ The premises are not safe for any purpose. This is no joke. We won't even try to warn you about
55
+ any dangerous or hazardous condition, whether we know about it or not. If we do decide to warn
56
+ you about something, that doesn't mean we will try to warn you about anything else. If we do
57
+ make an effort to fix an unsafe condition, we may not try to correct any others, and we may make
58
+ matters worse! We and our employees or agents may do things that are unwise and dangerous.
59
+ Sorry, we're not responsible. We may give you bad advice. Don't listen to us. In short, ENTER
60
60
  AND USE THE PRESERVE AT YOUR OWN RISK. And have fun!
@@ -1,5 +1,5 @@
1
- template: glossary
2
- +++
3
- This page uses the glossary template, which has the smarts to generate HTML from the glossary terms gleaned throughout the site.
4
-
1
+ template: glossary
2
+ +++
3
+ This page uses the glossary template, which has the smarts to generate HTML from the glossary terms gleaned throughout the site.
4
+
5
5
  The Glossary template doesn't actually use the `contents` of the page, so it doesn't matter what I put here.
@@ -1,8 +1,8 @@
1
- template : index
2
- title : Index
3
- description: Custom template to generate HTML index.
4
- +++
5
- YOU DO NOT NEED THIS FILE IF YOU ARE GENERATING CHMs.
6
-
7
- The `index` template is really only useful for generating HTML indexes, since the CHM writer
8
- generates the information necessary for the CHM to have its own special Index tab.
1
+ template : index
2
+ title : Index
3
+ description: Custom template to generate HTML index.
4
+ +++
5
+ YOU DO NOT NEED THIS FILE IF YOU ARE GENERATING CHMs.
6
+
7
+ The `index` template is really only useful for generating HTML indexes, since the CHM writer
8
+ generates the information necessary for the CHM to have its own special Index tab.
@@ -1,5 +1,5 @@
1
- template: toc
2
- +++
3
- This page uses the `toc` template, which has the smarts to generate HTML from the table of contents gathered from the site.
4
-
1
+ template: toc
2
+ +++
3
+ This page uses the `toc` template, which has the smarts to generate HTML from the table of contents gathered from the site.
4
+
5
5
  The `toc` template is really only useful for generating HTML TOCs, since the CHM writer generates the information necessary for the CHM to have its own special Contents tab.
@@ -1,21 +1,21 @@
1
- The MIT License
2
-
3
- Copyright (c) 2010 Gavin Kistner, Harold Hausman
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1
+ The MIT License
2
+
3
+ Copyright (c) 2010 Gavin Kistner, Harold Hausman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  THE SOFTWARE.
@@ -1,48 +1,48 @@
1
- # Organizing the Project
2
- The names and structure of files and folders are used for the table of contents.
3
- The only exceptions are:
4
-
5
- * As seen here, leading digits (used to sort items) are removed from the titles.
6
- * Also as seen here, underscores in the name are replaced with spaces.
7
- * Specifying a `title` attribute in the metasection overrides the file/folder name.
8
- * Files may be hidden from the contents by putting `hide: true` in the metasection.
9
- * A few special folders at the root of the project--`_glossary`, `_static`, and
10
- `_templates`--are exempt from conversion and the table of contents.
11
-
12
- # Creating Project Files
13
- The file extension of files in the project folder controls the interpretation of the
14
- markup. There are currently are five converters (of varying usefulness) which may be
15
- used to convert your markup to HTML:
16
-
17
- 1. **[Markdown](http://daringfireball.net/projects/markdown/syntax)** (*.md):
18
- This is the simplest (useful) markup converter. It has the benefits of being
19
- easy to read and sensible to author with almost no knowledge of HTML.
20
-
21
- The downside is that there is very little semantic markup available beyond
22
- headings and lists. You can inject inline HTML as you wish, however.
23
-
24
- 2. **[Textile](http://redcloth.org/textile)** (*.rc, *.textile):
25
- Textile has a lot of nice formatting features not present in Markdown.
26
- Further, it provides a much tighter coupling with HTML, allowing you to express
27
- a lot of HTML concepts in a markup format slightly better than HTML.
28
-
29
- It's better than HTML, but not as much fun to write in.
30
-
31
- 3. **HTML** (*.html, *.htm):
32
- This 'converter' just passes the HTML through untouched.
33
- (We plan on adding some sanitization options.)
34
-
35
- 4. **Raw Code** (*.rb, *.c, *.h, *.cpp, *.cs, *.txt, *.raw):
36
- Files with any of the above extensions will be wrapped in an HTML `<pre>` tag
37
- and sent along as the content of the page.
38
-
39
- 5. **[Haml](http://haml-lang.com/docs.html)** (*.haml):
40
- Haml is the language that all the templates of DocuBot are written in.
41
- It's a super-elegant, minimalist way of expressing HTML structure, merging
42
- in Ruby code where you see fit.
43
-
44
- It also lets you drop into Markup, Textile, or a variety of other
45
- [filters](http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#filters)
46
- for any section.
47
-
1
+ # Organizing the Project
2
+ The names and structure of files and folders are used for the table of contents.
3
+ The only exceptions are:
4
+
5
+ * As seen here, leading digits (used to sort items) are removed from the titles.
6
+ * Also as seen here, underscores in the name are replaced with spaces.
7
+ * Specifying a `title` attribute in the metasection overrides the file/folder name.
8
+ * Files may be hidden from the contents by putting `hide: true` in the metasection.
9
+ * A few special folders at the root of the project--`_glossary`, `_static`, and
10
+ `_templates`--are exempt from conversion and the table of contents.
11
+
12
+ # Creating Project Files
13
+ The file extension of files in the project folder controls the interpretation of the
14
+ markup. There are currently are five converters (of varying usefulness) which may be
15
+ used to convert your markup to HTML:
16
+
17
+ 1. **[Markdown](http://daringfireball.net/projects/markdown/syntax)** (*.md):
18
+ This is the simplest (useful) markup converter. It has the benefits of being
19
+ easy to read and sensible to author with almost no knowledge of HTML.
20
+
21
+ The downside is that there is very little semantic markup available beyond
22
+ headings and lists. You can inject inline HTML as you wish, however.
23
+
24
+ 2. **[Textile](http://redcloth.org/textile)** (*.rc, *.textile):
25
+ Textile has a lot of nice formatting features not present in Markdown.
26
+ Further, it provides a much tighter coupling with HTML, allowing you to express
27
+ a lot of HTML concepts in a markup format slightly better than HTML.
28
+
29
+ It's better than HTML, but not as much fun to write in.
30
+
31
+ 3. **HTML** (*.html, *.htm):
32
+ This 'converter' just passes the HTML through untouched.
33
+ (We plan on adding some sanitization options.)
34
+
35
+ 4. **Raw Code** (*.rb, *.c, *.h, *.cpp, *.cs, *.txt, *.raw):
36
+ Files with any of the above extensions will be wrapped in an HTML `<pre>` tag
37
+ and sent along as the content of the page.
38
+
39
+ 5. **[Haml](http://haml-lang.com/docs.html)** (*.haml):
40
+ Haml is the language that all the templates of DocuBot are written in.
41
+ It's a super-elegant, minimalist way of expressing HTML structure, merging
42
+ in Ruby code where you see fit.
43
+
44
+ It also lets you drop into Markup, Textile, or a variety of other
45
+ [filters](http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#filters)
46
+ for any section.
47
+
48
48
  Haml is useful for pages where you need a lot of specific HTML structure.
@@ -1,2 +1,2 @@
1
- * Unrecognized files are copied as-is to the same directory.
1
+ * Unrecognized files are copied as-is to the same directory.
2
2
  * You can also use the global `_static` directory which will be copied wholesale.
@@ -1,6 +1,6 @@
1
- title: Basic Concepts, Yo!
2
- +++
3
- You can set attributes for a section with a file named `index.*` in the directory.
4
- Among other things, this lets you set titles containing characters not allowed on the file system.
5
-
1
+ title: Basic Concepts, Yo!
2
+ +++
3
+ You can set attributes for a section with a file named `index.*` in the directory.
4
+ Among other things, this lets you set titles containing characters not allowed on the file system.
5
+
6
6
  (The title of this section in the table of contents will have the exclamation point.)
@@ -1,3 +1,3 @@
1
- * Put named terms in a `_glossary` folder at the root of the site.
2
- * Use double dollars around $$glossary terms$$ to add links to them on the page.
1
+ * Put named terms in a `_glossary` folder at the root of the site.
2
+ * Use double dollars around $$glossary terms$$ to add links to them on the page.
3
3
  * Use $$double dollars with colon:glossary term$$ to link alternative text to a standard entry.
@@ -1,10 +1,10 @@
1
- keywords: Indexing, Keyword Management
2
- no-index: headings, definitions
3
- +++
4
- Use the `keywords` tag along with comma-delimited terms or phrases to add specific entries in the index for the page.
5
-
6
- By default, every heading in every page is included in the index for the documentation. The `no-index: headings` info in the metasection above prevents that for this page.
7
-
8
- Definition titles (`<dt>...</dt>` in the HTML) are also put in the index by default. Use `no-index: definitions` to exclude them.
9
-
1
+ keywords: Indexing, Keyword Management
2
+ no-index: headings, definitions
3
+ +++
4
+ Use the `keywords` tag along with comma-delimited terms or phrases to add specific entries in the index for the page.
5
+
6
+ By default, every heading in every page is included in the index for the documentation. The `no-index: headings` info in the metasection above prevents that for this page.
7
+
8
+ Definition titles (`<dt>...</dt>` in the HTML) are also put in the index by default. Use `no-index: definitions` to exclude them.
9
+
10
10
  Put double-at signs around text in the page to @@add a word or phrase the index@@.
@@ -1,5 +1,5 @@
1
- toc: #bones-and-groups, #rigid-body-type, #physical-mesh
2
- +++
3
- * Use `toc: #list, #of-html, #identifiers` to add specific elements on the page,
4
- referenced by HTML id, as sub-section links in the table of contents.
5
- The contents of the HTML tag with that id will be used as the index header.
1
+ toc: #bones-and-groups, #rigid-body-type, #physical-mesh
2
+ +++
3
+ * Use `toc: #list, #of-html, #identifiers` to add specific elements on the page,
4
+ referenced by HTML id, as sub-section links in the table of contents.
5
+ The contents of the HTML tag with that id will be used as the index header.
@@ -1,5 +1,5 @@
1
- template: glossary
2
- +++
3
- This page uses the glossary template, which has the smarts to generate HTML from the glossary terms gleaned throughout the site.
4
-
1
+ template: glossary
2
+ +++
3
+ This page uses the glossary template, which has the smarts to generate HTML from the glossary terms gleaned throughout the site.
4
+
5
5
  The Glossary template doesn't actually use the `contents` of the page, so it doesn't matter what I put here.
@@ -1,6 +1,6 @@
1
- template: index
2
- title: Index
3
- +++
4
- This page uses the `index` template, which has the smarts to generate HTML from the indexed terms gleaned throughout the site.
5
-
1
+ template: index
2
+ title: Index
3
+ +++
4
+ This page uses the `index` template, which has the smarts to generate HTML from the indexed terms gleaned throughout the site.
5
+
6
6
  The `index` template is really only useful for generating HTML indexes, since the CHM writer generates the information necessary for the CHM to have its own special Index tab.
@@ -1,7 +1,7 @@
1
- template : toc
2
- description: Custom template to generate HTML TOC.
3
- +++
4
- YOU DO NOT NEED THIS FILE IF YOU ARE GENERATING CHMs.
5
-
6
- The `toc` template is really only useful for generating HTML contents, since the CHM writer
7
- generates the information necessary for the CHM to have its own special Contents tab.
1
+ template : toc
2
+ description: Custom template to generate HTML TOC.
3
+ +++
4
+ YOU DO NOT NEED THIS FILE IF YOU ARE GENERATING CHMs.
5
+
6
+ The `toc` template is really only useful for generating HTML contents, since the CHM writer
7
+ generates the information necessary for the CHM to have its own special Contents tab.
@@ -1,8 +1,8 @@
1
- company: Froboz Widgets
2
- title : Froboz Widgets Reference Manual
3
- author : Gavin Kistner
4
- edited : 2010-Jan-14
5
- +++
6
- A file named `index.*` (one of the recognized markup types) lets you specify global variables for the project.
7
-
1
+ company: Froboz Widgets
2
+ title : Froboz Widgets Reference Manual
3
+ author : Gavin Kistner
4
+ edited : 2010-Jan-14
5
+ +++
6
+ A file named `index.*` (one of the recognized markup types) lets you specify global variables for the project.
7
+
8
8
  Not every variable you put in the meta section has to be used; you can put your own metadata there.
@@ -1,19 +1,19 @@
1
- # encoding: UTF-8
2
- module DocuBot
3
- @snippets = {}
4
-
5
- def self.handle_snippet( regexp, &handler )
6
- @snippets[ regexp ] = handler
7
- end
8
-
9
- def self.process_snippets( page, html )
10
- # TODO: Don't process snippets on the 'raw' file types
11
- @snippets.inject(html){ |h,(regexp,handler)| h.gsub( regexp ){ |str| handler[ str, page ] } }
12
- end
13
-
14
- Dir[ DocuBot::DIR/'docubot/snippets/*.rb' ].each do |snippet|
15
- require snippet
16
- end
17
-
18
- end
19
-
1
+ # encoding: UTF-8
2
+ module DocuBot
3
+ @snippets = {}
4
+
5
+ def self.handle_snippet( regexp, &handler )
6
+ @snippets[ regexp ] = handler
7
+ end
8
+
9
+ def self.process_snippets( page, html )
10
+ # TODO: Don't process snippets on the 'raw' file types
11
+ @snippets.inject(html){ |h,(regexp,handler)| h.gsub( regexp ){ |str| handler[ str, page ] } }
12
+ end
13
+
14
+ Dir[ DocuBot::DIR/'docubot/snippets/*.rb' ].each do |snippet|
15
+ require snippet
16
+ end
17
+
18
+ end
19
+