瀏覽代碼

perf(hugo-encryptor.py): improve compatibility

Li4n0 6 年之前
父節點
當前提交
a9af34a69f
共有 3 個文件被更改,包括 4 次插入4 次删除
  1. 2 2
      README-zh_CN.md
  2. 1 1
      README.md
  3. 1 1
      hugo-encryptor.py

+ 2 - 2
README-zh_CN.md

@@ -2,7 +2,7 @@
 
 **Hugo-Encryptor** 是一款能够帮助作者保护文章内容的工具。它使用 AES-256 来对文章的内容进行加密,并且通过在文章中嵌入内联 `JavaScript` 代码来验证读者输入的密码是否正确。没有正确的文章密码,读者将无法看到文章的加密内容。
 
-[English Document](./README.md)
+[English Document](./README.md) [效果演示](https://blog.0e1.top/post/2019/03/this-is-hugo-encryptor/)
 
 ## 安装
 
@@ -71,7 +71,7 @@ $ python hugo-encryptor.py
 
 ## 配置
 
-虽然 **Hugo-Encryptor** 可以在没有经过任何配置的情况下正常运行,但是我们提供了一些设置,来帮助用户将 **Hugo-Encryptor **按照自己的喜好进行配置
+虽然 **Hugo-Encryptor** 可以在没有经过任何配置的情况下正常运行,但是我们提供了一些设置,来帮助用户将 **Hugo-Encryptor**按照自己的喜好进行配置
 
 ### 语言
 

+ 1 - 1
README.md

@@ -2,7 +2,7 @@
 
 **Hugo-Encryptor** is a tool to protect your [Hugo](https://gohugo.io) posts. It uses AES-256 to encrypt the contents of your posts, and inserts a snippet of `<script>` code to verify whether the password is correct or not in readers' browser. Without a correct key, nobody can decrypt your private posts.
 
-[中文文档](./README-zh_CN.md)
+[中文文档](./README-zh_CN.md) [demo](https://blog.0e1.top/post/2019/03/this-is-hugo-encryptor/)
 
 ## Installation
 

+ 1 - 1
hugo-encryptor.py

@@ -24,7 +24,7 @@ class AESCrypt(object):
 
 if __name__ == '__main__':
     md5 = hashlib.md5()
-    for dirpath, dirnames, filenames in os.walk('./public/post'):
+    for dirpath, dirnames, filenames in os.walk('./public'):
         for filename in filenames:
             if not filename.lower().endswith('.html'):
                 continue