Skip to content

Commit

Permalink
Only consider a product when the products/$product/product.yml exists.
Browse files Browse the repository at this point in the history
Disregard any other folder that might contain product.yml files, for
example the build/ directory would have them after the project was
built. Creating duplicated guides entries in the rendered guides page.
  • Loading branch information
ggbecker committed May 23, 2023
1 parent 45241b1 commit 846e4e8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions utils/gen_html_guides_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,9 @@ def create_index(data, template_name, output_filename):
def get_data(ssg_root):
products = []
p = pathlib.Path(ssg_root)
for product_file in p.glob("**/product.yml"):
for product_file in p.glob("products/**/product.yml"):
product_dir = product_file.parent
product_id = product_dir.name
# disregard folders that contain samples of product.yml files
# they are not a real product folder
if product_id in ["data", "example", "test_playbook_builder_data"]:
continue
with open(product_file, "r") as f:
product_yaml = yaml.full_load(f)
product_name = product_yaml["full_name"]
Expand Down

0 comments on commit 846e4e8

Please sign in to comment.