Skip to content

Commit 03cecb4

Browse files
committed
clean sitemap & skip Example in sitemap gen
1 parent f15e358 commit 03cecb4

2 files changed

Lines changed: 4 additions & 20 deletions

File tree

generate_sitemap.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ def generate_sitemap():
4141
# Traverse all subfolders and gather .json file data
4242
for root, dirs, files in os.walk(JSON_FOLDER):
4343
print(f"Checking folder: {root}")
44+
if "Example" in os.path.normpath(root).split(os.sep):
45+
continue # Skip any folder named Example
46+
print(f"Checking folder: {root}")
4447
for file_name in files:
4548
if file_name.endswith(".json") and not file_name.endswith("_actions.json") and not file_name.endswith("_frequency.json"):
4649
folder_name = os.path.splitext(file_name)[0]

sitemap.xml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
3-
<url>
4-
<loc>https://raw.githubusercontent.com/BioEcoOcean/metadata-tracking-dev/refs/heads/main/jsonFiles/Draft_Sub/Draft_Sub.json</loc>
5-
<lastmod>2025-07-22</lastmod>
6-
<changefreq>asneeded</changefreq>
7-
</url>
8-
<url>
9-
<loc>https://raw.githubusercontent.com/BioEcoOcean/metadata-tracking-dev/refs/heads/main/jsonFiles/Draft_Sub/Draft_Sub_actions.json</loc>
10-
<lastmod>2025-07-22</lastmod>
11-
<changefreq>asneeded</changefreq>
12-
</url>
13-
<url>
14-
<loc>https://raw.githubusercontent.com/BioEcoOcean/metadata-tracking-dev/refs/heads/main/jsonFiles/Example/Example.json</loc>
15-
<lastmod>2025-08-22</lastmod>
16-
<changefreq>asNeeded</changefreq>
17-
</url>
18-
<url>
19-
<loc>https://raw.githubusercontent.com/BioEcoOcean/metadata-tracking-dev/refs/heads/main/jsonFiles/Example/Example_actions.json</loc>
20-
<lastmod>2025-08-22</lastmod>
21-
<changefreq>asNeeded</changefreq>
22-
</url>
3+
</url>
234
</urlset>

0 commit comments

Comments
 (0)