Skip to content

Commit

Permalink
docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Aug 24, 2023
1 parent a930123 commit 5195ecb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scraper/src/fcc2zim/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@


def build_curriculum_redirects(curriculum_dist_dir: Path, fcc_lang: str):
"""
Build the list of redirects from challenge URL to Vite hash URL
The Vite app uses its own router to navigate. We have a single HTML file, but we
need an URL for each challenge for the zim search to work.
This builds the list of redirect needed fron the challenge URL to Vite hash URL.
"""
index_json_path = curriculum_dist_dir.joinpath("curriculum", fcc_lang, "index.json")
with open(index_json_path) as course_index_str:
superblock_dict = json.load(course_index_str)[fcc_lang]
Expand Down

0 comments on commit 5195ecb

Please sign in to comment.