-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache doesn't honor "force" option during generate #2700
Comments
@CITguy Normally it is recommended to put the LESS file in the theme directory (e.g. If that is inevitable, I suggest that you create a plugin to edit Cache data like my Plugin.
https://github.com/tea3/hexo-include-markdown/blob/master/lib/orverwriteCache.js#L52
https://github.com/tea3/hexo-include-markdown/blob/master/lib/orverwriteCache.js#L161 |
The fun thing about my setup is that I'm using Hexo to build out documentation for a design system. I've got Pages documenting each component and I'm using the Posts for release notes. Each component directory ( My script doesn't use the Hexo server, but uses Browsersync to serve up the Hexo correctly generates content on deploy, but this Cache issue is frustrating while I'm trying to develop locally. My scripts: https://gist.github.com/CITguy/94d1d33a5e36901e402a2cf8fbd27fd3 |
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I have an external script to watch for changes to ANY file in
source/
(including skipped, underscore files) and force a Hexo generate when that happens.I've also got a custom renderer defined for LESS compilation.
Given the following setup:
I would expect
public/styles/myStyles.css
to be regenerated with updated content any time_partial.less
changes.When I save
_partial.less
, my script triggers a forced generation. However, theCache
model seems to skipmyStyles.less
because neither its contents, nor its modified time have changed.Please update so that
Cache
will honor theforce
option passed to thegenerateConsole()
function.Currently, the only way around this is to restart my development script so that it generates all files as if it were the first generate.
hexo/lib/models/cache.js
Lines 36 to 41 in 5234c4a
hexo/lib/models/cache.js
Lines 52 to 57 in 5234c4a
The text was updated successfully, but these errors were encountered: