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
| location | string | | http url where the file can be dl ex:'https://mywebsite.com/' |
54
+
| location | string | | http url where the file can be dl ex:'https://mywebsite.com/' |
54
55
| localPath | string | | path where the include files could be found ex: path.join(__dirname, '/public') |
55
-
| depthMax | number | 4 | how far should the SSI include should look for match within included files (don't touch unless you know what you are doing) |
56
+
| depthMax | number | 4 | how far should the SSI include should look for match within included files |
56
57
| disableLocalScan | boolean | false | if you want the script to look only on the `location` url |
57
58
| includesMatcher | regex | /<!--\s?#\s?include\s+(?:virtual|file)="([^"]+)"(?:\s+stub="(\w+)")?\s?-->/ | regex of the matching string (don't touch unless you know what you are doing) |
59
+
| defaultCharset | string | utf-8 | force the file reader to convert the file content into a specific charset |
Copy file name to clipboardExpand all lines: lib/ssi.js
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,13 @@ const fs = require('fs');
12
12
* @param {number} [param.depthMax=4] how far should the SSI include should look for match withing inluded files
13
13
* @param {boolean} [param.disableLocalScan=false] if you want the script to look only on the `param.location` url
14
14
* @param {regex} [param.includesMatcher=/<!--\s?#\s?include\s+(?:virtual|file)="([^"]+)"(?:\s+stub="(\w+)")?\s?-->/] regex of the matching string (don't touch unless you know what you are doing)
15
-
* }
15
+
* @param {string} [param.defaultCharset='utf-8'] force the file reader to convert the file content into a specific charset
16
+
*
16
17
* @return {string} formated HTML with the SSI include files content
0 commit comments