theme-next / hexo-leancloud-counter-security

A plugin to fix a serious security bug in leancloud visitor counter for NexT.
GNU Lesser General Public License v3.0
34 stars 11 forks source link

Generate wrong url for each post for leancloud counter when running site in a subdirectory #6

Closed wuliuxiansheng closed 6 years ago

wuliuxiansheng commented 6 years ago

The url for a post should be /blog/post after deploy if running site in a subdirectory that is domain/blog/ but the url generated is /post.

LEAFERx commented 6 years ago

@wuliuxiansheng try checkout dev branch and test if it works fine. I don't have env to test for now.

wuliuxiansheng commented 6 years ago

@LEAFERx It still generates wrong urls.

LEAFERx commented 6 years ago

Could you give me examples for this version? And what's your roots variable in site _config.yml?

wuliuxiansheng commented 6 years ago

It generate the same urls with the master branch and I set the root to be /~chaoliu/ in my _config.yml file.

LEAFERx commented 6 years ago

what about now? I've tested it and it works fine.

wuliuxiansheng commented 6 years ago

It is not working. Now the url for all post become the root.

LEAFERx commented 6 years ago

sry it's my bad. I'm not pushing the right code. Now it should work. Pls try?

wuliuxiansheng commented 6 years ago

Great! It is working now. Thanks.

LEAFERx commented 6 years ago

Okay, I'll merge it into master.