Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

每次调用加密需要先清理public目录并生成一次 #15

Closed
sieveLau opened this issue Apr 24, 2021 · 1 comment
Closed

每次调用加密需要先清理public目录并生成一次 #15

sieveLau opened this issue Apr 24, 2021 · 1 comment
Assignees

Comments

@sieveLau
Copy link
Contributor

如果public文件夹有旧的内容,直接hugo生成网站之后调用hugo-encryptor会出现以下错误:
其中***是指我的home目录。

Traceback (most recent call last):
  File "hugo-encryptor.py", line 42, in <module>
    md5.update(block['data-password'].encode('utf-8'))
  File "***/.local/lib/python3.8/site-packages/bs4/element.py", line 1016, in __getitem__
    return self.attrs[key]
KeyError: 'data-password'

但是先rm -rf了再hugo和加密就不会报错。
或许不是bug,但是可以加到notice里?

@sieveLau sieveLau changed the title 每次调用加密需要清理public目录 每次调用加密需要先清理public目录并生成一次 Apr 24, 2021
@oyiadin oyiadin self-assigned this Apr 24, 2021
@oyiadin
Copy link
Collaborator

oyiadin commented Apr 24, 2021

Hi sieve,感谢反馈。Hugo 官方似乎建议删除 public/ 目录,稍后我会加到 notice 中 ;)

Hi, sieve, thanks for your feedback. It seems that Hugo suggests remove the public/ directory everytime. I will add a notice later ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants