Skip to content

Commit b0f5a64

Browse files
committed
handle -II files to /low
1 parent 514f57a commit b0f5a64

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/typesense_indexer.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ def clean_content(self, content: str) -> str:
9494

9595
def process_file(self, file_path: Path, content_root: Path, is_blog: bool = False) -> Optional[Dict[str, Any]]:
9696
"""Process a single markdown file and return a dict ready for indexing."""
97-
9897
def normalize_slug(s: str) -> str:
9998
return s.replace('_', '-')
10099

@@ -115,7 +114,13 @@ def normalize_slug(s: str) -> str:
115114
path_parts = [normalize_slug(p) for p in rel_path.parts[:-1]] # Remove filename and normalize
116115
url_path = '/' + '/'.join(['docs'] + path_parts)
117116
if file_path.name != 'index.md':
118-
url_path += '/' + normalize_slug(file_path.stem)
117+
# Handle special case: replace -ll suffix with /low
118+
stem = normalize_slug(file_path.stem)
119+
if stem.endswith('-ll'):
120+
stem = stem[:-3] # Remove -ll
121+
url_path += '/' + stem + '/low'
122+
else:
123+
url_path += '/' + stem
119124

120125
if url_path != '/' and url_path.endswith('/'):
121126
url_path = url_path.rstrip('/')

0 commit comments

Comments
 (0)