all repos — homestead @ 6e3b3d209b4e70fe2edc8d96ea8473efcd075bb9

Code for my website

content: switch static file copying to an allowlist

Alan Pearce
commit

6e3b3d209b4e70fe2edc8d96ea8473efcd075bb9

parent

3f8cb5cf6c5eef3401f8628bd7b3c2956a60eea5

1 file changed, 5 insertions(+), 4 deletions(-)

changed files
M domain/content/posts.godomain/content/posts.go
@@ -66,9 +66,10 @@ pageURLReplacer = strings.NewReplacer(
"index.md", "", ".md", "", ) - SkipList = []string{ - "LICENSE", - "taplo.toml", + StaticList = []string{ + "config.toml", + "cv.html", + "public_key.asc", } )
@@ -165,7 +166,7 @@ return err
} cc.Pages = append(cc.Pages, page) } - } else if !slices.Contains(SkipList, filename) { + } else if slices.Contains(StaticList, filename) { cc.StaticFiles = append(cc.StaticFiles, filename) } }