From 66aa100204c46e96f721971703dc8e89e71df364 Mon Sep 17 00:00:00 2001 From: angelinekwan Date: Wed, 2 Aug 2023 16:45:15 +0300 Subject: [PATCH] remove the subtitle since is not needed --- scripts/index_algolia.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/index_algolia.py b/scripts/index_algolia.py index 721baeeab5..32cf00ef7c 100644 --- a/scripts/index_algolia.py +++ b/scripts/index_algolia.py @@ -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() @@ -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',