-
Notifications
You must be signed in to change notification settings - Fork 113
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
Pagevariables not always available? #1081
Comments
Addon: As far as I can see, there seems to be an upper bound of variables being loaded? It always affects the last two files in the folder. If I rename, e.g. edit: Now I am super confused. I thought: Well. If loading all is maybe too much, let ´'s do the loading of page variables per single page and maybe that works. That worked perfectly in the running session when I developed that. But once I restarted Julia now the single-load parts always and only read edit2: Ah. It nothings on first run, but if I change the file while the life-server is running (the So. After so much time of debugging. Why is that the case? And how can I access pagevars in an edit3: Surprisingly (I left in a bit of debug) it works fine on CI. Seems to me like the page-vars are maybe loaded in parallel or so? See this debug https://github.com/kellertuer/kellertuer.github.io/actions/runs/8176798601/job/22357013932#step:5:374 where all pagevars are displayed nicely. Locally I loose most of them, sometimes only the last (now its the oldest projects, since I sort first before accessing them now). Currently the last 2. But as soon as Franklin reloads on LIveServer all is fine. Sorry to not being able to narrow it down further. But if possible, that loading pagevars could be finished before calling any |
I have been suffering from something similar for a while now. At https://bhvieira.github.io/blog/ in the deployment the pagevars for posts from 2020 are not retrieved correctly (this works flawlessly in local) |
This was corrected with a |
Can you make that a bit more precise where you put that and how |
Thanks, will try that on my function later as well then. |
Ah, works great! Thanks for finding that out. |
Glad to hear! |
I ran into an interesting problem, which I think even started with the last beaking change – but not only did I have to find time to narrow it down, it is also a bit complicated to describe.
Status
Currently when running Franklin locally (seems fine on CI) on Avery first run I got an error, but when just (in the same environment) running it again, it was fine.
The error message was, that some of my page vars seem to be nothing, but I could not narrow that down. Until today.
In the folder https://github.com/kellertuer/kellertuer.github.io/tree/master/projects I use the page-variables to store metadata about the projects. Now the code loading them is
https://github.com/kellertuer/kellertuer.github.io/blob/32a223db8fcc907fb6ad67523ef72f77cab318a1/utils.jl#L17-L29
Where I mainly crawl the folder and for every file I read the metadata into a large dict. For two of the projects ( https://github.com/kellertuer/kellertuer.github.io/blob/master/projects/mvirt.md and https://github.com/kellertuer/kellertuer.github.io/blob/master/projects/secondordertv.md ) being
nothing
) besides the title for the first.This also caused the errors, since I assumed that the
start
is always a proper date. Which then it was not for these two.So: What might be reasons for these two files to not be able to load the
pagevars
? Is that a bug in Franklin or a problem on my side ;) ?The text was updated successfully, but these errors were encountered: