all repos — homestead @ 9458f3d1b77a89c90d1759ae601c5e155c6ff752

Code for my website

hash style elements during build step

Alan Pearce
commit

9458f3d1b77a89c90d1759ae601c5e155c6ff752

parent

5286a622169bb8a495b01a85ff7eccf29f1eb11a

1 file changed, 12 insertions(+), 0 deletions(-)

changed files
A internal/builder/hasher.go
@@ -0,0 +1,12 @@
+package builder + +import ( + "crypto/sha256" + "encoding/base64" +) + +func hash(s string) string { + shasum := sha256.New() + shasum.Write([]byte(s)) + return "sha256-" + base64.StdEncoding.EncodeToString(shasum.Sum(nil)) +}