Skip to content

Commit 99db2f2

Browse files
authored
[N/A] Ignore files prefixed with underscore (#91)
1 parent dda4f74 commit 99db2f2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/services/PartsKit.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,13 @@ public static function getNav(): array
8787

8888
$path = str_replace($partsPath, '', $templatePath);
8989
$pathParts = explode('/', $path);
90-
$title = self::_formatTitle(end($pathParts));
90+
$lastPart = end($pathParts);
91+
92+
if(str_starts_with($lastPart, '_')) {
93+
continue;
94+
}
95+
96+
$title = self::_formatTitle($lastPart);
9197
$url = is_file($templatePath)
9298
? '/' . $partsKitFolderName . '/' . self::_removeExtension($path)
9399
: null;

0 commit comments

Comments
 (0)