diff --git a/generate_index.py b/generate_index.py index 47c887b..0cbbc80 100644 --- a/generate_index.py +++ b/generate_index.py @@ -46,7 +46,7 @@ def generate_index(dir_path): has_content = True elif os.path.isdir(file_path) and os.path.basename(file_path) != ".github": # Add directories, but avoid creating links for excluded directories like `.github` - dir_url = file_path.replace(base_dir, "").replace(os.sep, "/") + dir_url = os.path.basename(file_path) # Get the directory name directly index_content += f'