Browse Source

default to public if no path provided

Dennis Rodewyk 6 năm trước cách đây
mục cha
commit
cff333e96b
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      hugo-encrypt.go

+ 3 - 0
hugo-encrypt.go

@@ -64,6 +64,9 @@ func encryptPage(path string) {
 
 func main() {
 	sitePath := os.Args[1]
+	if !sitePath {
+        sitePath = "public"
+    }
 	err := filepath.Walk(sitePath, func(path string, f os.FileInfo, err error) error {
 		if f == nil {
 			return err