hexo-theme-skapp icon indicating copy to clipboard operation
hexo-theme-skapp copied to clipboard

common.js location issue

Open factoryal opened this issue 7 years ago • 16 comments

image

I'm testing appling this theme at http://localhost:4000/mk/ Every file loads okay except common.js Only this file is trying to load in root directory, not /mk/ directory. How can I fix that?

Thanks for your answer and sorry for my english...

factoryal avatar Jan 26 '18 04:01 factoryal

use order hexo s to test( not hexo s -debug)

BruceYuj avatar Jan 26 '18 05:01 BruceYuj

@BruceYuj I tried but not working also.

factoryal avatar Jan 26 '18 05:01 factoryal

can you show me the hexo console log ?

BruceYuj avatar Jan 26 '18 05:01 BruceYuj

@BruceYuj

image

Is this right?

factoryal avatar Jan 26 '18 05:01 factoryal

it looks correct. common. js is concat by other js files.

BruceYuj avatar Jan 26 '18 05:01 BruceYuj

common. js has been created. Can you flush your browser and show me the error hexo log

BruceYuj avatar Jan 26 '18 05:01 BruceYuj

@BruceYuj image

image

I force removed the cache and loaded again. but nothing changes. The index.css file directory is correct. It's in /mk/ subdirectory. but common.js file is not.

factoryal avatar Jan 26 '18 05:01 factoryal

what is your OS

BruceYuj avatar Jan 26 '18 05:01 BruceYuj

Windows 10 Pro Insider Preview Build 17074.rs_prerelease_fit.180116-1539 image

factoryal avatar Jan 26 '18 05:01 factoryal

@fatoryal because i can't use my computer now, i can't test your problem. can you wait for some hours or check your configuration or restart your computer.

BruceYuj avatar Jan 26 '18 05:01 BruceYuj

@BruceYuj Thanks for your support.

factoryal avatar Jan 26 '18 05:01 factoryal

@factoryal
this is my test hexo s log hexo s

this is the post site http://localhost:4000/2018/01/22/2017-1-22-context-and-executionContext/ dev html structure. hexo-post

When I use order hexo g, I can find the common.js file in the public\js folder. default

BruceYuj avatar Jan 26 '18 06:01 BruceYuj

@BruceYuj Yeah, It works when I set server location as root (localhost:4000/) But It is not working when server location at subdirectory (localhost:4000/mk/) Directory of js files are absolute not relative.

factoryal avatar Jan 26 '18 07:01 factoryal

@factoryal That is because the index page does not need the common.js file.

BruceYuj avatar Jan 26 '18 07:01 BruceYuj

@factoryal Hi, do you fix your problem?

BruceYuj avatar Jan 27 '18 11:01 BruceYuj

@BruceYuj Sorry for late reply. I didn't fix the problem yet. Some other Hexo themes causes this problem also. (example: https://github.com/stkevintan/hexo-theme-material-flow/issues/4) Now, I'm working in root directory.

factoryal avatar Feb 06 '18 05:02 factoryal