浏览代码

default to public if no path provided

Dennis Rodewyk 5 年之前
父节点
当前提交
cff333e96b
共有 1 个文件被更改,包括 3 次插入0 次删除
  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