Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
remove the subtitle since is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
angelinekwan committed Aug 2, 2023
1 parent 798d954 commit 66aa100
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions scripts/index_algolia.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ def parse_pages(html_build_dir):
for admonition in elements.select('div.admonition'):
admonition.decompose()

# Extract text from the first p tag and remove it
for first_p in elements.select('p'):
subtitle = first_p.text.strip()
first_p.decompose()
break # we only want the first paragraph

# remove tables of contents
for toc in elements.select('div.toctree-wrapper'):
toc.decompose()
Expand All @@ -66,7 +60,6 @@ def parse_pages(html_build_dir):
body = elements.text.strip()
pages.append({
'title': title,
'subtitle': subtitle[:160] + '...' if len(subtitle) > 160 else subtitle,
'body': body,
'slug': full_path,
'facetingType': 'documentation',
Expand Down

0 comments on commit 66aa100

Please sign in to comment.