You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I promise this is one of the last 5 issues I open 😁
You have that code in place inside convert_posts which removes certain frontmatter variables.
I am using Jekyll since years now and Liquid has kinda autoboxes certain values like PHP, but I am using a lot of bool and empty string values in my current wordpress theme to check for conditions.
When I do the export, half of the variables are missing in my frontmatter in certain files. This makes it more complicated for me to write the correct code, because I cannot assume that the fields are always there.
Maybe its just my dev brain that tries toi make it failsafe, but also larger search&replace actions are more complicated, because the keys are available in some files and not others.
I simply commented the unset line, but I wanted to point out that this behavior is (for me) unexpected. An exporter should export and not make decisions of what is a key of value and which ones are "use-less". Can I ask for the why of that code?
I can raise a PR to remove this foreach, but I guess this one is again a matter of opinion and I can also include it in a PR where I am going to add some docs for the next person.
The text was updated successfully, but these errors were encountered:
👍. Jekyll has a "no magic" philosophy, so removing that would make sense.
I don't recall the original motivation. I suspect plugins or just having an old blog gave me lots of empty / unnecessary fields. If anything, maybe put a filter there so folks can build their own logic if they really want it? But I agree, find and replace makes more sense.
I promise this is one of the last 5 issues I open 😁
You have that code in place inside
convert_posts
which removes certain frontmatter variables.I am using Jekyll since years now and Liquid has kinda autoboxes certain values like PHP, but I am using a lot of bool and empty string values in my current wordpress theme to check for conditions.
wordpress-to-jekyll-exporter/jekyll-exporter.php
Lines 280 to 284 in 403fc70
When I do the export, half of the variables are missing in my frontmatter in certain files. This makes it more complicated for me to write the correct code, because I cannot assume that the fields are always there.
Maybe its just my dev brain that tries toi make it failsafe, but also larger search&replace actions are more complicated, because the keys are available in some files and not others.
I simply commented the
unset
line, but I wanted to point out that this behavior is (for me) unexpected. An exporter should export and not make decisions of what is a key of value and which ones are "use-less". Can I ask for the why of that code?I can raise a PR to remove this foreach, but I guess this one is again a matter of opinion and I can also include it in a PR where I am going to add some docs for the next person.
The text was updated successfully, but these errors were encountered: