-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgh-pages-builder.config.js
More file actions
92 lines (84 loc) · 2.13 KB
/
gh-pages-builder.config.js
File metadata and controls
92 lines (84 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
* GitHub Pages Builder Configuration
* This file demonstrates both sync and async config patterns
*/
// Example of async config (uncomment to test async functionality)
// module.exports = async function() {
// // Simulate async operation (e.g., reading from API, database, etc.)
// return new Promise((resolve) => {
// setTimeout(() => {
// resolve({
// inputPattern: '**/*.md',
// outputDir: 'tmp/docs',
// ignorePatterns: [
// '**/node_modules/**',
// '**/dist/**',
// '**/build/**',
// '**/.git/**',
// '**/coverage/**',
// '**/docs/**',
// '**/test/**',
// '**/tests/**',
// '**/vendor/**',
// '**/composer/**',
// '**/simplehtmldom/**'
// ],
// tocPlaceholder: /<!--\s*toc\s*-->/i,
// renameReadme: true
// });
// }, 100);
// });
// };
// Example of sync function config
module.exports = function () {
return {
/**
* Glob pattern to find markdown files
*/
inputPattern: '**/*.md',
/**
* Output directory for processed files
*/
outputDir: 'tmp/docs',
/**
* Patterns to ignore when searching for markdown files
*/
ignorePatterns: [
'**/node_modules/**',
'**/dist/**',
'**/build/**',
'**/.git/**',
'**/coverage/**',
'**/docs/**',
'**/test/**',
'**/tests/**',
'**/vendor/**',
'**/composer/**',
'**/simplehtmldom/**'
],
/**
* Regular expression to match TOC placeholder in markdown
*/
tocPlaceholder: /<!--\s*toc\s*-->/i,
/**
* Whether to rename README.md files to index.md
*/
renameReadme: true,
/**
* Custom processing options
*/
processing: {
generateToc: true,
enableAnchors: true,
tocIndentSize: 2
}
};
};
// Example of direct object export (simplest form)
// module.exports = {
// inputPattern: '**/*.md',
// outputDir: 'tmp/docs',
// ignorePatterns: ['**/node_modules/**', '**/dist/**'],
// tocPlaceholder: /<!--\s*toc\s*-->/i,
// renameReadme: true
// };