Skip to content

Commit 3605343

Browse files
redreceiptdanez
authored andcommitted
Uses Parent Directory Instead of Naming index.md (#337)
1 parent 49d3aa4 commit 3605343

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

example/buildDocs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ function buildDocs(api) {
3434

3535
function getComponentName(filepath) {
3636
var name = path.basename(filepath);
37+
// check for index.js
38+
if (name === 'index.js') {
39+
const dirs = path.dirname(filepath).split('/');
40+
name = dirs[dirs.length - 1];
41+
}
3742
var ext;
3843
while ((ext = path.extname(name))) {
3944
name = name.substring(0, name.length - ext.length);

0 commit comments

Comments
 (0)