Determine the priority based on the URL path and specified higher priority section.
(url_path, higher_priority_section)
| 17 | yield url |
| 18 | |
| 19 | def determine_priority(url_path, higher_priority_section): |
| 20 | """Determine the priority based on the URL path and specified higher priority section.""" |
| 21 | if url_path.count("/") <= 1: # Pages directly under the base URL |
| 22 | return "1.0" |
| 23 | elif higher_priority_section and url_path.startswith(f"./{higher_priority_section}"): # Pages in the specified higher priority section |
| 24 | return "0.8" |
| 25 | else: |
| 26 | return "0.5" # All other pages |
| 27 | |
| 28 | def generate_sitemap(domain, output_path, summary_file_path, higher_priority_section): |
| 29 | """Generate a sitemap XML file from SUMMARY.md structure.""" |
no outgoing calls
no test coverage detected
searching dependent graphs…