summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Sior <aho@sior.be>2022-09-01 21:53:20 +0200
committerAlejandro Sior <aho@sior.be>2022-09-01 21:53:20 +0200
commit17ef28693e2b8ff13336c772ec4b120bfe0dd22c (patch)
treed3e84518fda5da24d938137eb98d397a1582f9a0
parent1ccd4c87136091e7a71f05c8660849552e0dba36 (diff)
site: don't display hidden directory contents in navHEADmaster
-rw-r--r--site.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/site.go b/site.go
index 46e6cee..c7d3c19 100644
--- a/site.go
+++ b/site.go
@@ -43,6 +43,10 @@ func rootTree(root string, goal string) (NavTree, string) {
index = current
}
+ if info.IsDir() && info.Name()[0] == '.' {
+ return filepath.SkipDir
+ }
+
if current == root || info.Name()[0] == '.' {
return nil
}