Bug in precedence of project image files over theme image files
Environment Info
Platform: Mac OSX v10.14.2
Node version(node -v): v10.14.2
Your site _config.yml (Optional): Not related
Your theme _config.yml (Optional): Not related
Hexo and Plugin version(npm ls --depth 0):
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
BUG Report
-
BUG description In a project I am working on using hexo I installed a theme called Strata (https://github.com/livingos/hexo-theme-strata). This theme has an image at /themes/strata/source/images/bg.jpg and when I add a /source/images/bg.jpg it replaces the one in the theme with my projects image. This is the correct behaviour, right? Then I made some changes in the theme layouts and added another image /themes/strata/source/images/map.jpg and a substitute in my project in /source/images/map.jpg and this time it gets the one in the theme instead of the one in the project when generating... I suppose this is not the correct way to process the files, right? It seems that the precedence of files is kind of random... after that I designed a new favicon.ico and added it to the project /source/images/ folder and it worked, then after generate it stopped working and the original hexo favicon started to show again... really strange behaviour.
-
The way to reproduce This is an intermittent problem. Seems that it works as expected first time (just while
hexo serverwas already running), but after anhexo clean && hexo generate && hexo serverit stops working. -
Log with hexo
--debug
10:07:01.238 DEBUG Writing database to /Users/xxx/Desktop/testprj/db.json
10:07:01.255 DEBUG Hexo version: 3.8.0
10:07:01.256 DEBUG Working directory: ~/Desktop/testprj/
10:07:01.376 DEBUG Config loaded: ~/Desktop/testprj/_config.yml
10:07:01.399 DEBUG Plugin loaded: hexo-generator-archive
10:07:01.401 DEBUG Plugin loaded: hexo-generator-tag
10:07:01.402 DEBUG Plugin loaded: hexo-generator-index
10:07:01.405 DEBUG Plugin loaded: hexo-generator-category
10:07:01.588 DEBUG Plugin loaded: hexo-renderer-scss
10:07:01.589 DEBUG Plugin loaded: hexo-renderer-stylus
10:07:01.594 DEBUG Plugin loaded: hexo-renderer-marked
10:07:01.598 DEBUG Plugin loaded: hexo-renderer-ejs
10:07:01.667 DEBUG Plugin loaded: hexo-server
10:07:01.669 DEBUG Loading database.
10:07:01.690 INFO Start processing
10:07:01.718 DEBUG Processed: _posts/hello-world.md
10:07:01.735 DEBUG Theme config loaded.
10:07:01.737 DEBUG Processed: _config.yml
10:07:01.737 DEBUG Processed: source/css/font-awesome.min.css
10:07:01.737 DEBUG Processed: source/css/main.css
10:07:01.737 DEBUG Processed: source/images/bg.jpg
10:07:01.738 DEBUG Processed: source/images/avatar.jpg
10:07:01.738 DEBUG Processed: source/images/no-map.jpg
10:07:01.738 DEBUG Processed: source/js/main.js
10:07:01.738 DEBUG Processed: source/js/skel.min.js
10:07:01.738 DEBUG Processed: source/js/jquery.poptrox.min.js
10:07:01.739 DEBUG Processed: source/js/util.js
10:07:01.739 DEBUG Processed: source/sass/ie8.scss
10:07:01.739 DEBUG Processed: source/sass/font-awesome.min.css
10:07:01.739 DEBUG Processed: source/sass/main.scss
10:07:01.742 DEBUG Processed: source/fonts/fontawesome-webfont.eot
10:07:01.742 DEBUG Processed: source/fonts/FontAwesome.otf
10:07:01.743 DEBUG Processed: source/fonts/fontawesome-webfont.woff
10:07:01.743 DEBUG Processed: source/fonts/fontawesome-webfont.woff2
10:07:01.743 DEBUG Processed: source/images/favicon.ico
10:07:01.743 DEBUG Processed: source/js/jquery.min.js
10:07:01.750 DEBUG Processed: layout/category.ejs
10:07:01.750 DEBUG Processed: layout/layout.ejs
10:07:01.750 DEBUG Processed: layout/archive.ejs
10:07:01.750 DEBUG Processed: layout/page.ejs
10:07:01.750 DEBUG Processed: layout/index.ejs
10:07:01.750 DEBUG Processed: layout/post.ejs
10:07:01.754 DEBUG Processed: images/map.jpg
10:07:01.754 DEBUG Processed: source/fonts/fontawesome-webfont.ttf
10:07:01.754 DEBUG Processed: source/images/fulls/03.jpg
10:07:01.754 DEBUG Processed: source/images/fulls/01.jpg
10:07:01.754 DEBUG Processed: source/images/fulls/02.jpg
10:07:01.755 DEBUG Processed: source/images/fulls/04.jpg
10:07:01.755 DEBUG Processed: source/images/fulls/05.jpg
10:07:01.755 DEBUG Processed: source/images/fulls/06.jpg
10:07:01.755 DEBUG Processed: source/images/thumbs/01.jpg
10:07:01.756 DEBUG Processed: source/images/thumbs/03.jpg
10:07:01.756 DEBUG Processed: source/images/thumbs/02.jpg
10:07:01.756 DEBUG Processed: source/images/thumbs/04.jpg
10:07:01.756 DEBUG Processed: source/images/thumbs/05.jpg
10:07:01.756 DEBUG Processed: source/images/thumbs/06.jpg
10:07:01.757 DEBUG Processed: source/js/ie/html5shiv.js
10:07:01.757 DEBUG Processed: source/js/ie/respond.min.js
10:07:01.757 DEBUG Processed: source/js/ie/backgroundsize.min.htc
10:07:01.757 DEBUG Processed: source/js/ie/PIE.htc
10:07:01.757 DEBUG Processed: source/sass/images/overlay.png
10:07:01.764 DEBUG Processed: layout/_partial/after-footer.ejs
10:07:01.764 DEBUG Processed: layout/_partial/article-page.ejs
10:07:01.764 DEBUG Processed: layout/_partial/archive-post.ejs
10:07:01.764 DEBUG Processed: layout/_partial/archive.ejs
10:07:01.764 DEBUG Processed: layout/_partial/article-archive.ejs
10:07:01.765 DEBUG Processed: layout/_partial/article-index.ejs
10:07:01.765 DEBUG Processed: layout/_partial/article.ejs
10:07:01.765 DEBUG Processed: layout/_partial/contact-form.ejs
10:07:01.765 DEBUG Processed: layout/_partial/google-analytics.ejs
10:07:01.765 DEBUG Processed: layout/_partial/footer.ejs
10:07:01.765 DEBUG Processed: layout/_partial/head.ejs
10:07:01.765 DEBUG Processed: layout/_partial/header.ejs
10:07:01.765 DEBUG Processed: layout/_partial/pagination.ejs
10:07:01.768 DEBUG Processed: layout/_partial/post/comments.ejs
10:07:01.768 DEBUG Processed: layout/_partial/post/meta.ejs
10:07:01.768 DEBUG Processed: layout/_partial/post/gallery.ejs
10:07:01.768 DEBUG Processed: layout/_partial/post/title.ejs
10:07:01.768 DEBUG Processed: layout/_partial/post/category.ejs
10:07:01.768 DEBUG Processed: layout/_partial/post/tags.ejs
10:07:01.769 DEBUG Processed: source/fonts/fontawesome-webfont.svg
10:07:01.771 DEBUG Processed: images/bg.jpg
10:07:01.772 DEBUG Processed: images/favicon.ico
10:07:01.780 DEBUG Generator: page
10:07:01.780 DEBUG Generator: post
10:07:01.780 DEBUG Generator: archive
10:07:01.780 DEBUG Generator: tag
10:07:01.781 DEBUG Generator: index
10:07:01.781 DEBUG Generator: category
10:07:01.782 DEBUG Generator: asset
10:07:01.785 INFO Files loaded in 116 ms
10:07:01.791 DEBUG Rendering post: hello-world/index.html
10:07:01.896 DEBUG Rendering archive: archives/index.html
10:07:01.903 DEBUG Rendering archive: archives/2019/index.html
10:07:01.908 DEBUG Rendering archive: archives/2019/03/index.html
10:07:01.913 DEBUG Rendering index: index.html
10:07:01.974 INFO 0 files generated in 189 ms
10:07:01.980 DEBUG Database saved
Is it possible to reproduce the bug with [email protected] ? I tested it in the local environment (macOS 10.15 & Node.js 12) and no bugs appeared. Thanks.
See also https://github.com/ahonn/hexo-theme-even/issues/261
I will close this Issue since it cannot be reproduced and has not received any new responses for a long time. This problem may be related to a race condition. If you can reproduce this issue on a newer version of Hexo, please feel free to let me know.