Skip to content

Commit

Permalink
Fix to exclude additional folders
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavasana authored Dec 3, 2024
1 parent 7ac2f24 commit f9aec8d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions generate_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

# Function to generate index.html for a given folder
def generate_index(dir_path):
# Avoid generating index in any excluded folders
if any(excluded in dir_path for excluded in exclude_folders):
return

files = os.listdir(dir_path)

# Skip if the directory is empty
Expand Down Expand Up @@ -50,7 +46,7 @@ def walk_directory(directory):
# Iterate through the subdirectories and generate index files
for dirpath, dirnames, filenames in os.walk(directory):
# Avoid the .github folder and other unwanted folders
if ".github" in dirpath:
if dirpath in exclude_folders:
continue

generate_index(dirpath)
Expand Down

0 comments on commit f9aec8d

Please sign in to comment.