D0n9X1n / hexo-blog-encrypt

Yet, just another hexo plugin for security.
https://www.npmjs.com/package/hexo-blog-encrypt
MIT License
971 stars 101 forks source link

使用了Hexo的Obsidian主题后,再使用这个这个加密功能,无法正确的打开博文 #172

Closed KappaFish0914 closed 3 years ago

KappaFish0914 commented 3 years ago

Issue

Expected Behavior

输入密码后,正确的打开博文

Actual Behavior

没有打开博文。 输入密码,键盘回车后,没有任何响应。既没有显示密码错误,也没有显示密码正确。也没有进入页面。

直接点击博文标题,进入博文后,还是要求输入密码,但是输入密码后点击回车,依然没有任何响应。

Steps to Reproduce the Problem

  1. 输入密码
  2. 点击回车
  3. 没有任何响应

Specifications

(The version of the project, operating system, hardware etc.)

// package.json
"dependencies": {
    "css-select": "^2.1.0",
    "hexo": "^5.0.0",
    "hexo-blog-encrypt": "^3.1.6",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^2.0.0",
    "hexo-generator-search": "^2.4.1",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^4.0.0",
    "hexo-renderer-stylus": "^2.0.0",
    "hexo-server": "^2.0.0",
    "hexo-theme-landscape": "^0.0.3",
    "lodash": "^4.17.21",
    "lodash.assignin": "^4.2.0",
    "lodash.bind": "^4.2.1",
    "lodash.defaults": "^4.2.0",
    "lodash.filter": "^4.6.0",
    "lodash.flatten": "^4.4.0",
    "lodash.foreach": "^4.5.0",
    "lodash.map": "^4.6.0",
    "lodash.merge": "^4.6.2",
    "lodash.pick": "^4.4.0",
    "lodash.reduce": "^4.6.0",
    "lodash.reject": "^4.6.0",
    "lodash.some": "^4.6.0"
  }
//config.yml

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
# theme: landscape
theme: obsidian

# 文章加密
encrypt: # hexo-blog-encrypt
  abstract: 有东西被加密了, 请输入密码查看.
  message: 您好, 这里需要密码.
  theme: xray
  tags:
  - {name: 测试测试, password: hello}
  wrong_pass_message: 抱歉, 这个密码看着不太对, 请再试试.
  wrong_hash_message: 抱歉, 这个文章不能被校验, 不过您还是能看看解密后的内容.

image

KappaFish0914 commented 3 years ago

image 当我将主题改会landscape时,却可以正常的加密了

# _config.yml

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: landscape
# theme: obsidian
D0n9X1n commented 3 years ago

应该是和主题冲突了. 估计只能二选一了, 插件能做的有限.

KappaFish0914 commented 3 years ago

应该是和主题冲突了. 估计只能二选一了, 插件能做的有限.

我用火狐浏览器测试了一下,发现在火狐浏览器上 加密插件时可以和Obsidian主题一起使用的。但是谷歌浏览器不行