Open Sogl opened 2 years ago
That's odd, i think this might be a windows thing. I've never had such issues on a mac. Can you confirm you ran this on windows?
Mac OS Catalina 10.15.7
oh i see you are using inheritance. Have you read these docs: https://getgrav.org/premium/typhoon/docs#theme-modification ?
Inheritance is not recommended with Typhoon because of its features and complexity. Some intrepid user managed to do it, and provided some caveats and notes for our documentation, but again we definitely DON't recommend it. You should use Typhoon as the base and COPY it. That way you get all the features, and can customize freely.
I'm not sure how that relates to your issue with the quotes and things changing though, but definitely worth trying a COPY rather than an INHERIT and see if that does resolve the issue for you.
I already corrected for the necessary quotes and everything worked. I have read the docs and I am aware of the risks and potential problems.
However, there is an inheritance problem in this plugin, which is why I wrote this issue.
I will investigate further. thanks.
I just ran into this same issue with using devtools plugin to create a new-theme by inheritance, running on linux... it replacing ' and " with html codes in the theme .yaml file, as described above.
The issue seems to be this file of the plugin code in particular:
user/plugins/devtools/components/theme/inheritance/theme.yaml.twig
Inside, there is a line where it is printing the config:
{{ component.config }}
If we add twig's raw filter onto the above, as in:
{{ component.config|raw }}
It copies the config verbatim, without translating any of those " and ' to html codes.
@rhukster Perhaps this is the only code fix needed here.
As a side note, with the above I was attempting to inherit Typhoon (for which this issue actually does not seem specific to this theme), and these days thankfully it is not discouraged to do so by inheritance, with instructions herein: https://getgrav.org/premium/typhoon/docs#create-a-custom-theme-from-typhoon
Tried to inherit Typhoon theme and got an error:
Console:
Ok. Cache cleared, browser refreshed, error still exist... found another issue: https://github.com/getgrav/grav/issues/3549
Decided to compare
typhoon.yaml
andmy-typhoon.yaml
to find differences and that's it:Normal
typhoon.yaml
color block:Bad
my-typhoon.yaml
color block:Why does it use
'
istead of'
?Same about quotes:
"
istead of"