When I edit 'gen_links.py' to add more extension in line 63
from
filtered_paths = [path for path in paths if path.endswith(('.pdf', '.zip', '.rar', '.7z', '.docx', '.doc'))]
to
filtered_paths = [path for path in paths if path.endswith(('.pdf', '.zip', '.rar', '.7z', '.docx', '.doc', '.pptx', '.ppt', '.md'))]
CI reports an error when building course pages:
Traceback (most recent call last):
File "/home/runner/work/hitsz-openauto.github.io/hitsz-openauto.github.io/scripts/gen_links.py", line 81, in <module>
save_files_list(owner, repo, username, token)
File "/home/runner/work/hitsz-openauto.github.io/hitsz-openauto.github.io/scripts/gen_links.py", line 64, in save_files_list
result_content = create_hugo_shortcode(filtered_paths, owner, repo)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/hitsz-openauto.github.io/hitsz-openauto.github.io/scripts/gen_links.py", line 12, in create_hugo_shortcode
result += generate_folder_shortcode(directory, content, owner, repo)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/hitsz-openauto.github.io/hitsz-openauto.github.io/scripts/gen_links.py", line 29, in generate_folder_shortcode
for name, value in content.items():
^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'items'
Error: Process completed with exit code 1.
When I edit 'gen_links.py' to add more extension in line 63
from
to
CI reports an error when building course pages:
Ref: https://github.com/HITSZ-OpenAuto/hitsz-openauto.github.io/actions/runs/7363824719/job/20043643516