docgen-tool 2.1.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/.gitattributes +1 -0
  2. package/.github/workflows/deploy-website.yml +28 -0
  3. package/.prettierignore +4 -0
  4. package/.prettierrc +4 -0
  5. package/LICENSE +35 -33
  6. package/{docgen → dist/docgen.js} +11 -22
  7. package/docgen.js +95 -0
  8. package/package.json +47 -20
  9. package/source/__test__/test-run/contents.json +12 -0
  10. package/source/__test__/test-run/overview.txt +3 -0
  11. package/source/__test__/test-run/parameters.json +32 -0
  12. package/source/__test__/test-run/release-notes.txt +4 -0
  13. package/source/docgen.js +900 -775
  14. package/source/example/contents.json +11 -11
  15. package/source/example/index.txt +3 -3
  16. package/source/example/parameters.json +36 -36
  17. package/source/internal-readme.md +4 -0
  18. package/source/pdf-stylesheet.css +26 -20
  19. package/source/require/docgen.css +76 -69
  20. package/source/require/katexInjector.js +9 -13
  21. package/source/require/print.css +26 -19
  22. package/source/templates/main.html +93 -93
  23. package/source/user-guide/advanced-content.txt +170 -170
  24. package/source/user-guide/contents.json +56 -56
  25. package/source/user-guide/files/images/svg/inkit-logo.svg +9 -0
  26. package/source/user-guide/index.txt +257 -244
  27. package/source/user-guide/installation.txt +49 -49
  28. package/source/user-guide/parameters.json +36 -36
  29. package/source/user-guide/release-notes.txt +69 -58
  30. package/source/user-guide/running.txt +46 -46
  31. package/source/user-guide/troubleshooting.txt +31 -31
  32. package/source/user-guide/upgrading.txt +25 -25
  33. package/source/user-guide/version-control.txt +13 -13
  34. package/source/user-guide/writing-content.txt +269 -269
  35. package/tsconfig.json +8 -0
  36. package/.npmignore +0 -2
  37. package/docs/advanced-content.html +0 -239
  38. package/docs/commonmark.html +0 -225
  39. package/docs/docgen.pdf +0 -0
  40. package/docs/files/images/overview.png +0 -0
  41. package/docs/files/images/pdf.png +0 -0
  42. package/docs/files/images/svg/icon.svg +0 -845
  43. package/docs/files/images/svg/overview.svg +0 -1345
  44. package/docs/files/images/text.png +0 -0
  45. package/docs/files/images/web.png +0 -0
  46. package/docs/index.html +0 -333
  47. package/docs/installation.html +0 -121
  48. package/docs/ownership.html +0 -164
  49. package/docs/release-notes.html +0 -144
  50. package/docs/require/docgen.css +0 -131
  51. package/docs/require/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  52. package/docs/require/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  53. package/docs/require/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  54. package/docs/require/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  55. package/docs/require/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  56. package/docs/require/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  57. package/docs/require/katex/fonts/KaTeX_Math-Regular.woff +0 -0
  58. package/docs/require/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  59. package/docs/require/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  60. package/docs/require/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  61. package/docs/require/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  62. package/docs/require/katex/katex.min.css +0 -1
  63. package/docs/require/katex/katex.min.js +0 -6
  64. package/docs/require/katexInjector.js +0 -22
  65. package/docs/require/print.css +0 -19
  66. package/docs/require/webknife/fonts/DroidSansMono.woff +0 -0
  67. package/docs/require/webknife/fonts/OpenSans.woff +0 -0
  68. package/docs/require/webknife/fonts/OpenSansBold.woff +0 -0
  69. package/docs/require/webknife/fonts/OpenSansBoldItalic.woff +0 -0
  70. package/docs/require/webknife/fonts/OpenSansItalic.woff +0 -0
  71. package/docs/require/webknife/framework.icons.js +0 -82
  72. package/docs/require/webknife/framework.min.css +0 -3
  73. package/docs/require/webknife/framework.min.js +0 -14
  74. package/docs/require/webknife/highlight.min.css +0 -1
  75. package/docs/require/webknife/highlight.min.js +0 -6
  76. package/docs/running.html +0 -123
  77. package/docs/troubleshooting.html +0 -105
  78. package/docs/upgrading.html +0 -124
  79. package/docs/version-control.html +0 -102
  80. package/docs/writing-content.html +0 -305
  81. /package/{docs → source/__test__/test-run}/files/images/logo.png +0 -0
@@ -1,171 +1,171 @@
1
- <style>
2
- .container {
3
- box-sizing: border-box;
4
- float:left;
5
- width: 480px;
6
- }
7
- .codeContainer {
8
- margin: 0 20px 0 0;
9
- }
10
- .codeContainer pre {
11
- margin: 0;
12
- }
13
- .codeContainer code {
14
- }
15
- .codeContainer p {
16
- margin: 0;
17
- padding: 0;
18
- }
19
- .exampleContainer {
20
- margin: 0;
21
- border: 1px solid #666;
22
- border-radius: 6px;
23
- padding: 0 18px 0 18px;
24
- }
25
- .exampleContainer img {
26
- margin-top: 5px;
27
- }
28
- #content table {
29
- width: 400px!important;
30
- }
31
- .hljs-change {
32
- background-color: initial!important;
33
- }
34
- </style>
35
-
36
- Advanced styles
37
- ---------------
38
-
39
- DocGen is built on the [Webknife CSS framework](http://mtmacdonald.github.io/webknife). Any of the HTML elements and
40
- styles from Webknife can be used in a DocGen source file. For details, see
41
- the [Webknife reference guide](http://mtmacdonald.github.io/webknife/docs/reference.html).
42
-
43
- Basic tables
44
- ------------
45
-
46
- Basic tables can be inserted with the Github-flavoured Markdown
47
- [table extension](https://help.github.com/articles/github-flavored-markdown/#tables).
48
-
49
- <div class="container codeContainer">
50
- <pre><code>| Heading | Heading | Heading |
51
- |:-----------:----------:|--------:|
52
- | Something | Something | ? |
53
- | Another | Another | ? |
54
- | One more | One more | ? |</code></pre>
55
- </div>
56
- <div class="container exampleContainer">
57
- <table class="w-table w-fixed w-stripe">
58
- <thead>
59
- <tr>
60
- <th style="text-align:left">Heading</th>
61
- <th style="text-align:center">Heading</th>
62
- <th style="text-align:right">Heading</th>
63
- </tr>
64
- </thead>
65
- <tbody>
66
- <tr>
67
- <td style="text-align:left">Something</td>
68
- <td style="text-align:center">Something</td>
69
- <td style="text-align:right">?</td>
70
- </tr>
71
- <tr>
72
- <td style="text-align:left">Another</td>
73
- <td style="text-align:center">Another</td>
74
- <td style="text-align:right">?</td>
75
- </tr>
76
- <tr>
77
- <td style="text-align:left">One more</td>
78
- <td style="text-align:center">One more</td>
79
- <td style="text-align:right">?</td>
80
- </tr>
81
- </tbody>
82
- </table>
83
- </div><br class="w-clear"/>
84
-
85
- HTML tables
86
- -----------
87
-
88
- Regular HTML can also be used for tables, allowing full custom styling (including table and column widths).
89
-
90
- <div class="container codeContainer">
91
- <pre><code>&lt;table style=&quot;width:100%;&quot;&gt;
92
- &lt;tr&gt;
93
- &lt;th&gt;Heading&lt;/th&gt;
94
- &lt;th&gt;Heading&lt;/th&gt;
95
- &lt;th&gt;Heading&lt;/th&gt;
96
- &lt;/tr&gt;
97
- &lt;tr&gt;
98
- &lt;td class=&quot;bold&quot;&gt;Example&lt;/td&gt;
99
- &lt;td&gt;Example&lt;/td&gt;
100
- &lt;td&gt;Example&lt;/td&gt;
101
- &lt;/tr&gt;
102
- &lt;tr&gt;
103
- &lt;td&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/td&gt;
104
- &lt;td class=&quot;w-success-text&quot;&gt;Example&lt;/td&gt;
105
- &lt;td&gt;&lt;span class=&quot;w-icon&quot; data-name=&quot;checkmark&quot;&gt;&lt;/span&gt;&lt;/td&gt;
106
- &lt;/tr&gt;
107
- &lt;tr&gt;
108
- &lt;td&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/td&gt;
109
- &lt;td class=&quot;w-error-text&quot;&gt;Example&lt;/td&gt;
110
- &lt;td&gt;&lt;span class=&quot;w-icon&quot; data-name=&quot;close&quot;&gt;&lt;/td&gt;
111
- &lt;/tr&gt;
112
- &lt;/table&gt;</code></pre>
113
- </div>
114
- <div class="container exampleContainer">
115
- <table style="width:100%;">
116
- <tr>
117
- <th>Heading</th>
118
- <th>Heading</th>
119
- <th>Heading</th>
120
- </tr>
121
- <tr>
122
- <td class="bold">Example</td>
123
- <td>Example</td>
124
- <td>Example</td>
125
- </tr>
126
- <tr>
127
- <td><strong>Example</strong></td>
128
- <td class="w-success-text">Example</td>
129
- <td><span class="w-icon" data-name="checkmark"></span></td>
130
- </tr>
131
- <tr>
132
- <td><strong>Example</strong></td>
133
- <td class="w-error-text">Example</td>
134
- <td><span class="w-icon" data-name="close"></td>
135
- </tr>
136
- </table>
137
- </div><br class="w-clear"/>
138
-
139
- Creating internal links to page sections
140
- ----------------------------------------
141
-
142
- To create links to other sections within one content page, put hyphens between the words in the heading and prepend with #:
143
-
144
- [link to heading](#this-is-a-heading)
145
-
146
- ... other page content here ...
147
-
148
- This is a heading
149
- -----------------
150
-
151
- Creating internal links to other pages
152
- --------------------------------------
153
-
154
- To create links to *other* content pages provide the relative url to the page:
155
-
156
- [link to heading](example-page.html)
157
-
158
- Control of page breaks in the PDF
159
- ---------------------------------
160
-
161
- DocGen does not provide precision control over PDF layout. However, some steps can be taken in case of page break
162
- issues (the most common problem).
163
-
164
- To *force* a page break, insert the following before an element that should appear on a new page:
165
-
166
- <p class="dg-forceBreak"></p>
167
-
168
- DocGen automatically tries to eliminate page breaks *inside* code blocks, block quotes, and table rows.
169
- To apply the same technique to other elements, revert to HTML and apply the **dg-avoidBreak** class. For example:
170
-
1
+ <style>
2
+ .container {
3
+ box-sizing: border-box;
4
+ float:left;
5
+ width: 480px;
6
+ }
7
+ .codeContainer {
8
+ margin: 0 20px 0 0;
9
+ }
10
+ .codeContainer pre {
11
+ margin: 0;
12
+ }
13
+ .codeContainer code {
14
+ }
15
+ .codeContainer p {
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+ .exampleContainer {
20
+ margin: 0;
21
+ border: 1px solid #666;
22
+ border-radius: 6px;
23
+ padding: 0 18px 0 18px;
24
+ }
25
+ .exampleContainer img {
26
+ margin-top: 5px;
27
+ }
28
+ #content table {
29
+ width: 400px!important;
30
+ }
31
+ .hljs-change {
32
+ background-color: initial!important;
33
+ }
34
+ </style>
35
+
36
+ Advanced styles
37
+ ---------------
38
+
39
+ DocGen is built on the [Webknife CSS framework](http://mtmacdonald.github.io/webknife). Any of the HTML elements and
40
+ styles from Webknife can be used in a DocGen source file. For details, see
41
+ the [Webknife reference guide](http://mtmacdonald.github.io/webknife/docs/reference.html).
42
+
43
+ Basic tables
44
+ ------------
45
+
46
+ Basic tables can be inserted with the Github-flavoured Markdown
47
+ [table extension](https://help.github.com/articles/github-flavored-markdown/#tables).
48
+
49
+ <div class="container codeContainer">
50
+ <pre><code>| Heading | Heading | Heading |
51
+ |:-----------:----------:|--------:|
52
+ | Something | Something | ? |
53
+ | Another | Another | ? |
54
+ | One more | One more | ? |</code></pre>
55
+ </div>
56
+ <div class="container exampleContainer">
57
+ <table class="w-table w-fixed w-stripe">
58
+ <thead>
59
+ <tr>
60
+ <th style="text-align:left">Heading</th>
61
+ <th style="text-align:center">Heading</th>
62
+ <th style="text-align:right">Heading</th>
63
+ </tr>
64
+ </thead>
65
+ <tbody>
66
+ <tr>
67
+ <td style="text-align:left">Something</td>
68
+ <td style="text-align:center">Something</td>
69
+ <td style="text-align:right">?</td>
70
+ </tr>
71
+ <tr>
72
+ <td style="text-align:left">Another</td>
73
+ <td style="text-align:center">Another</td>
74
+ <td style="text-align:right">?</td>
75
+ </tr>
76
+ <tr>
77
+ <td style="text-align:left">One more</td>
78
+ <td style="text-align:center">One more</td>
79
+ <td style="text-align:right">?</td>
80
+ </tr>
81
+ </tbody>
82
+ </table>
83
+ </div><br class="w-clear"/>
84
+
85
+ HTML tables
86
+ -----------
87
+
88
+ Regular HTML can also be used for tables, allowing full custom styling (including table and column widths).
89
+
90
+ <div class="container codeContainer">
91
+ <pre><code>&lt;table style=&quot;width:100%;&quot;&gt;
92
+ &lt;tr&gt;
93
+ &lt;th&gt;Heading&lt;/th&gt;
94
+ &lt;th&gt;Heading&lt;/th&gt;
95
+ &lt;th&gt;Heading&lt;/th&gt;
96
+ &lt;/tr&gt;
97
+ &lt;tr&gt;
98
+ &lt;td class=&quot;bold&quot;&gt;Example&lt;/td&gt;
99
+ &lt;td&gt;Example&lt;/td&gt;
100
+ &lt;td&gt;Example&lt;/td&gt;
101
+ &lt;/tr&gt;
102
+ &lt;tr&gt;
103
+ &lt;td&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/td&gt;
104
+ &lt;td class=&quot;w-success-text&quot;&gt;Example&lt;/td&gt;
105
+ &lt;td&gt;&lt;span class=&quot;w-icon&quot; data-name=&quot;checkmark&quot;&gt;&lt;/span&gt;&lt;/td&gt;
106
+ &lt;/tr&gt;
107
+ &lt;tr&gt;
108
+ &lt;td&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/td&gt;
109
+ &lt;td class=&quot;w-error-text&quot;&gt;Example&lt;/td&gt;
110
+ &lt;td&gt;&lt;span class=&quot;w-icon&quot; data-name=&quot;close&quot;&gt;&lt;/td&gt;
111
+ &lt;/tr&gt;
112
+ &lt;/table&gt;</code></pre>
113
+ </div>
114
+ <div class="container exampleContainer">
115
+ <table style="width:100%;">
116
+ <tr>
117
+ <th>Heading</th>
118
+ <th>Heading</th>
119
+ <th>Heading</th>
120
+ </tr>
121
+ <tr>
122
+ <td class="bold">Example</td>
123
+ <td>Example</td>
124
+ <td>Example</td>
125
+ </tr>
126
+ <tr>
127
+ <td><strong>Example</strong></td>
128
+ <td class="w-success-text">Example</td>
129
+ <td><span class="w-icon" data-name="checkmark"></span></td>
130
+ </tr>
131
+ <tr>
132
+ <td><strong>Example</strong></td>
133
+ <td class="w-error-text">Example</td>
134
+ <td><span class="w-icon" data-name="close"></td>
135
+ </tr>
136
+ </table>
137
+ </div><br class="w-clear"/>
138
+
139
+ Creating internal links to page sections
140
+ ----------------------------------------
141
+
142
+ To create links to other sections within one content page, put hyphens between the words in the heading and prepend with #:
143
+
144
+ [link to heading](#this-is-a-heading)
145
+
146
+ ... other page content here ...
147
+
148
+ This is a heading
149
+ -----------------
150
+
151
+ Creating internal links to other pages
152
+ --------------------------------------
153
+
154
+ To create links to *other* content pages provide the relative url to the page:
155
+
156
+ [link to heading](example-page.html)
157
+
158
+ Control of page breaks in the PDF
159
+ ---------------------------------
160
+
161
+ DocGen does not provide precision control over PDF layout. However, some steps can be taken in case of page break
162
+ issues (the most common problem).
163
+
164
+ To *force* a page break, insert the following before an element that should appear on a new page:
165
+
166
+ <p class="dg-forceBreak"></p>
167
+
168
+ DocGen automatically tries to eliminate page breaks *inside* code blocks, block quotes, and table rows.
169
+ To apply the same technique to other elements, revert to HTML and apply the **dg-avoidBreak** class. For example:
170
+
171
171
  <p class="dg-avoidBreak">A long paragraph</p>
@@ -1,57 +1,57 @@
1
1
  [
2
- {
3
- "heading" : "Quick Start",
4
- "column" : 1,
5
- "pages" : [
6
- {
7
- "title": "Overview",
8
- "source": "index.txt",
9
- "html": true
10
- },
11
- {
12
- "title": "Installation",
13
- "source": "installation.txt"
14
- },
15
- {
16
- "title": "Upgrading",
17
- "source": "upgrading.txt"
18
- }
19
- ]
20
- },
21
- {
22
- "heading" : "User Guide",
23
- "column" : 2,
24
- "pages" : [
25
- {
26
- "title": "Running DocGen",
27
- "source": "running.txt"
28
- },
29
- {
30
- "title": "Writing content",
31
- "source": "writing-content.txt"
32
- },
33
- {
34
- "title": "CommonMark reference",
35
- "source": "commonmark.txt"
36
- },
37
- {
38
- "title": "Advanced content",
39
- "source": "advanced-content.txt"
40
- }
41
- ]
42
- },
43
- {
44
- "heading" : "Help",
45
- "column" : 3,
46
- "pages" : [
47
- {
48
- "title": "Troubleshooting",
49
- "source": "troubleshooting.txt"
50
- },
51
- {
52
- "title": "Using with version control",
53
- "source": "version-control.txt"
54
- }
55
- ]
56
- }
57
- ]
2
+ {
3
+ "heading": "Quick Start",
4
+ "column": 1,
5
+ "pages": [
6
+ {
7
+ "title": "Overview",
8
+ "source": "index.txt",
9
+ "html": true
10
+ },
11
+ {
12
+ "title": "Installation",
13
+ "source": "installation.txt"
14
+ },
15
+ {
16
+ "title": "Upgrading",
17
+ "source": "upgrading.txt"
18
+ }
19
+ ]
20
+ },
21
+ {
22
+ "heading": "User Guide",
23
+ "column": 2,
24
+ "pages": [
25
+ {
26
+ "title": "Running DocGen",
27
+ "source": "running.txt"
28
+ },
29
+ {
30
+ "title": "Writing content",
31
+ "source": "writing-content.txt"
32
+ },
33
+ {
34
+ "title": "CommonMark reference",
35
+ "source": "commonmark.txt"
36
+ },
37
+ {
38
+ "title": "Advanced content",
39
+ "source": "advanced-content.txt"
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "heading": "Help",
45
+ "column": 3,
46
+ "pages": [
47
+ {
48
+ "title": "Troubleshooting",
49
+ "source": "troubleshooting.txt"
50
+ },
51
+ {
52
+ "title": "Using with version control",
53
+ "source": "version-control.txt"
54
+ }
55
+ ]
56
+ }
57
+ ]
@@ -0,0 +1,9 @@
1
+ <svg width="417" height="101" viewBox="0 0 417 101" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M80.0297 0.904297V35.2876L104.013 46.8376L67.9297 64.4543V100.554L132.763 68.1376C135.68 66.6876 137.513 63.7043 137.513 60.4543V34.9876C137.513 31.7376 135.68 28.7543 132.763 27.3043L80.0297 0.937625V0.904297Z" fill="#010203"/>
3
+ <path d="M69.7279 0.904434L4.89453 33.3211C1.97787 34.7711 0.144531 37.7544 0.144531 41.0044V66.4711C0.144531 69.7211 1.97787 72.7044 4.89453 74.1544L57.6279 100.521V64.4211L33.6445 52.8711L69.7279 35.2544V0.871094V0.904434Z" fill="#010203"/>
4
+ <path d="M166.145 20.0547H178.628V74.0213H166.145V20.0547Z" fill="#010203"/>
5
+ <path d="M248.645 20.0547V74.0213H238.395L211.478 41.2547V74.0213H199.145V20.0547H209.478L236.311 52.8213V20.0547H248.645Z" fill="#010203"/>
6
+ <path d="M291.71 52.8213L284.46 60.3713V74.0213H272.043V20.0547H284.46V45.2713L308.36 20.0547H322.243L299.876 44.1047L323.543 74.0213H308.976L291.71 52.8213Z" fill="#010203"/>
7
+ <path d="M338.293 20.0547H350.776V74.0213H338.293V20.0547Z" fill="#010203"/>
8
+ <path d="M387.028 30.238H369.762V20.0547H416.795V30.238H399.528V74.038H387.045V30.238H387.028Z" fill="#010203"/>
9
+ </svg>