diff --git a/mkht.php b/mkht.php index be93b2e..d79fcdf 100755 --- a/mkht.php +++ b/mkht.php @@ -73,9 +73,13 @@ foreach($nodes as $node) { copy($src, $target); if ($node_info->getExtension() !== 'md') continue; - $pages[] = $node; preg_match('/(?[-\w]+)(?:\.(?[a-z]{2}))?\.md/', $path_parts_src['basename'], $matches); + if ($matches['pagename'] === strtoupper($matches['pagename'])) // Ignore uppercase-only filenames (like README.md) + continue; + + $pages[] = $node; + $lang = $matches['lang'] ?? $config['default-lang'] ?? exit('no language found for ' . $src . LF); $pages_langs[$path_parts_src['dirname'] . '/' . $matches['pagename']][] = $lang;