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

setup the is error #118

Closed nondevops closed 4 years ago

nondevops commented 4 years ago

Issue

Expected Behavior

hexo 3.9 next 7

Actual Behavior

Steps to Reproduce the Problem

  1. _ install the result error.

Specifications

image

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

D0n9X1n commented 4 years ago

Do you use the latest version? Can you provide the tags part in your blog?

Seems that your tags part is not an array.

Hexo can parse the header like below, but this plugin only supports array so far.

---
title: Test.md
date: 2019-11-03 13:57:49
tags: FFF
---

Change to:

---
title: Test.md
date: 2019-11-03 13:57:49
tags: 
    - FFF
---
nondevops commented 4 years ago

Can you show the tags part in your blog?

Seems that your tags part is not an array.

Hexo can parse the header like below, but this plugin only supports array so far.

---
title: Test.md
date: 2019-11-03 13:57:49
tags: FFF
---

Change to:

---
title: Test.md
date: 2019-11-03 13:57:49
tags: 
    - FFF
---

Will fix in next version.

@MikeCoder This is what I set up before installing this plug-in,And I'm having a problem installing this plug-in, not deploying and publishing it

image

D0n9X1n commented 4 years ago

Weird, I can't reproduce this on my computer, it shouldn't run the plugin when installing.

Also, you can install the plugin manually.

Then, add console.log to node_modules/hexo-blog-encrypt/index.js line 39, like:

  if (data.tags) {
    // add log here to find out which blog is wrong.
    console.log(data);
    console.log(data.tags);
    data.tags.forEach((cTag, index) => {
      if(tagEncryptName.includes(cTag.name)){
        password = password || tagEncryptPass[index];
      }
    });
  }

It may help.

nondevops commented 4 years ago

Weird, I can't reproduce this on my computer, it shouldn't run the plugin when installing.

Also, you can install the plugin manually.

  • go to node_modules folder, and run git clone https://github.com/MikeCoder/hexo-blog-encrypt.git
  • add "hexo-blog-encrypt": "^3.0.3", to package.json

Then, add console.log to node_modules/hexo-blog-encrypt/index.js line 39, like:

  if (data.tags) {
    // add log here to find out which blog is wrong.
    console.log(data);
    console.log(data.tags);
    data.tags.forEach((cTag, index) => {
      if(tagEncryptName.includes(cTag.name)){
        password = password || tagEncryptPass[index];
      }
    });
  }

It may help.

I think you should test this problem,ths @MikeCoder

D0n9X1n commented 4 years ago

For bugs that occur in a specific scenario, debug requires corresponding scenario information. As a developer, you should also be clear that if I can't reproduce it then I can't solve it.

BTW, this is not commercial software.