From 9b277737d6b968780d623e9b88392fc9b006ab38 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Tue, 25 Mar 2025 18:37:21 -0700 Subject: [PATCH] handle hugolify-theme has theme.yml instead of theme.yaml or theme.toml --- rank_hugo_themes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rank_hugo_themes.py b/rank_hugo_themes.py index 931d29e..413cb61 100755 --- a/rank_hugo_themes.py +++ b/rank_hugo_themes.py @@ -394,6 +394,8 @@ def get_repo_info_for_hugo_themes_from_gitlab(): def get_theme_toml_file_name(theme_name): + if theme_name == "hugolify/hugolify-theme": + return "theme.yml" if theme_name in THEMESYAMLTHEMES: return "theme.yaml" else: @@ -551,6 +553,8 @@ def parse_themes_toml_for_each_hugo_themes(): theme_name = get_corrected_theme_name(theme.name) if theme_name in THEMESYAMLTHEMES: theme_toml = yaml.full_load(content) + elif theme_name == "hugolify/hugolify-theme": + theme_toml = yaml.full_load(content) else: theme_toml = toml.loads(match.sub(r'"\1"\n', content)) if "tags" in theme_toml: