You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without customizing dom, you can also work with the hook dom `div#__exampleDom`, placeholder in default [template file](https://github.com/ant-tool/atool-doc/blob/master/tpl/element.ejs), eg:
103
103
@@ -120,22 +120,17 @@ If the templates above can not meet your needs, just try writing a new one!
120
120
121
121
- write your template file with following variables available **on the context of `file`**
122
122
123
-
-`meta`: meta info of each example file, `{ name: 'something', someKey: 'someValue' }`
124
-
125
-
-`link`: link of all demo files, `{ demoName: 'demoPath' }`
126
-
127
-
-`title`: file-path relative to `source` dir, `examples/basic`
128
-
129
-
-`filePath`: string of file-path, `examples/basic`
130
-
131
-
-`resource`: kinds of path for resourceFile, `{ name: 'basicNameAndExt', relativeToCwd: 'relativePathToCwd' }`
132
-
133
-
-`script`: array of script-path need to insert into the html file, `['../common.js', './basic.js']`
134
-
135
-
-`html`: string of html element, `<div></div>`
136
-
137
-
-`style`: string of style by css, `body { color: red; }`
138
-
139
-
-`desc`: code of demo and other things written by markdown, `<h2>code</h2><div class="highlight"></div>`
123
+
|param|decription|format|
124
+
|:---:|:--------:|:----:|
125
+
|meta|meta info of each example file|`{ name: 'something', someKey: 'someValue' }`|
126
+
|link|link of all demo files|`{ demoName: 'demoPath' }`|
127
+
|title|file-path relative to `source` dir|`basic`|
128
+
|filePath|string of file-path|`examples/basic`|
129
+
|resource|kinds of path for resourceFile|`{ name: 'basicNameAndExt', relativeToCwd: 'relativePathToCwd' }`|
130
+
|script|array of script-path need to insert into the html file|`['../common.js', './basic.js']`|
131
+
|html|string of html element|`<div></div>`|
132
+
|style|string of style by css|`body { color: red; }`|
133
+
|desc|code of demo and other things written by markdown|`<h2>code</h2><div class="highlight"></div>`|
134
+
|alias|alias of each file, generating by meta.title|see [meta config](https://raw.githubusercontent.com/ant-tool/atool-doc/master/examples/customizeName.md)|
140
135
141
136
*The template file only support syntax of `ejs` currently*
0 commit comments