branch: externals/hugoista
commit cac43adbbc9df5c4f3599bf262839e14c647b91a
Author: c-alpha <c-al...@noreply.codeberg.org>
Commit: c-alpha <c-al...@noreply.codeberg.org>

    Address PR #2 in a Slightly Different Way
---
 hugoista.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/hugoista.el b/hugoista.el
index de6f7a59e6..812aaa1ca4 100644
--- a/hugoista.el
+++ b/hugoista.el
@@ -203,8 +203,14 @@ CONTENT-GROUPS is a grouped list in the format produced by
 
 (defun hugoista--hugo-site-dir-p (dir)
   "Test whether DIR is a Hugo site directory."
-  (or (file-exists-p (expand-file-name "hugo.toml" dir))
-      (file-exists-p (expand-file-name "config.toml" dir))))
+  (> (length (directory-files dir nil
+                              (rx bos
+                                  (or "hugo" "config")
+                                  "."
+                                  (or "toml" (seq "y" (opt "a") "ml"))
+                                  eos)
+                              t))
+     0))
 
 ;;;; Interactive Functions
 

Reply via email to