Closed gjtorikian closed 9 years ago
You can keep a hash if you want on the Determinator maybe? {"path" => Time}
?
I understood maybe five of those words.
So a Hash is kept, and then what? "Rerun Determinator if Time > 45 minutes
" ?
@gjtorikian Sure, or just keep an ongoing cache of all the dates (unformatted of course) and don't rebuild anything in the current process. That would ensure, when using --watch
, that git
is only ever called once per page per process (not each time the listener rebuilds).
That hardly makes sense to me in words. Sorry I suck at words today.
:heart:
I think the sexy rewrite nullified this. I can no longer reproduce the error.
YAYYYY :tada: sexy = perf
Still an issue.
Are you using {{ page.last_modified_at }}
or {% last_modified_at %}
? The latter will spawn a multitude of processes, whereas the former will cache at the page level so each subsequent call to it on the page just returns the already-computed value.
The latter, though maybe I should switch to the former? Either way the problem needed to be fixed.
Definitely use page.last_modified_at
as often as possible. I think you'll find it doesn't thrash your system as much. :smile:
How do I install this as a plugin within jekyll ... I created a _plugin directory and git cloned into it now what ?
@AnandLA @parkr @gjtorikian I can only use
{% last_modified_at %}
If I try to include {% page.last_modified_at %}
in my layout, I get the following error, when I try to bundle exec jekyll build
:
Liquid syntax error (line 1): Unknown tag 'page' in /_layouts/page.html
How to fix this please?
I'm experiencing a similar issue to @888ba8.
Liquid Exception: No such file or directory - /Users/mraible/dev/path/to/blog/tags/android/index.html does not exist! in /_layouts/tag.html
jekyll 3.9.0 | Error: No such file or directory - /Users/mraible/dev/path/to/blog/_source/blog/tags/android/index.html does not exist!
If I remove {{ page.last_modified_at }}
and replace it with {% last_modified_at %}
, I get the same error.
Anyone figure out a way to add "Last updated" to a Jekyll blog? I tried a few other solutions, but none seem to work.
Pre-0.3.0, Jekyll sites would crash with this plugin and
--watch
. Now, they remain, but generation takes a really long time, because every single file needs a Git call to check the time.@parkr Is there a way to run a plugin once, before the server starts up, and not every time an auto-regeneration occurs? If not, the only thing I can think of is to preserve some kind of hash, like
@matches[absolute_path_to_article] = last_change
, and just not even attempt the last_modified_at check if the file was checked once before.