Skip to content
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

Extendable YAML and Twig files #904

Open
1 of 2 tasks
w00fz opened this issue Oct 14, 2015 · 8 comments
Open
1 of 2 tasks

Extendable YAML and Twig files #904

w00fz opened this issue Oct 14, 2015 · 8 comments

Comments

@w00fz
Copy link
Member

w00fz commented Oct 14, 2015

This is to remind, consolidate and group together a couple issues we have open that should get addressed contemporary. [#751 #782]

  • YAML files should be extendable other than just overridable like it is now. Allowing for portions of yaml files to be reworked without having to copy over the original.
    As this gets addressed, it's worth noticing that we do still need to add support for theme.yaml [in wiki agenda] overrides and it could be the perfect opportunity to implement that as well.
  • It should be easier to extend blocks of a twig file without the need of overriding the whole thing. As we discussed, this is very complicated matter and it might not even be doable with just the Twig tools at our disposition.
    However, the discussed approach of relying on <file_name>-custom.twig.html, to detect if there are extensions to a twig file, seems to be the most promising and viable approach by allowing users to simply extend blocks portion of a twig file.

These are both important implementations that need to be addressed.

@w00fz w00fz modified the milestones: 5.1.6, 5.1.7 Oct 14, 2015
@mahagr mahagr modified the milestones: 5.1.7, 5.2.0, 5.2.1, 5.2.2 Oct 28, 2015
@w00fz w00fz modified the milestones: 5.2.2, 5.2.3 Nov 10, 2015
@mahagr mahagr modified the milestones: 5.2.3, 5.2.4 Nov 16, 2015
@w00fz w00fz removed this from the 5.2.4 milestone Nov 30, 2015
@mahagr mahagr modified the milestones: 5.3.0, 5.3.1, 5.3.2 Jul 8, 2016
@mahagr mahagr modified the milestones: 5.3.2, 5.3.3 Jul 19, 2016
@w00fz w00fz modified the milestones: 5.3.3, 5.3.5 Aug 25, 2016
@mahagr mahagr modified the milestones: 5.3.5, 5.3.6 Sep 3, 2016
@mahagr mahagr modified the milestone: 5.3.6 Oct 6, 2016
@mahagr mahagr modified the milestone: Future Releases Jan 26, 2017
@mahagr mahagr changed the title Extendable Twig files (and YAML) Extendable YAML and Twig files Jan 31, 2017
@AmibeWebsites
Copy link
Contributor

Where can I see how this works? Thanks...

@mahagr
Copy link
Member

mahagr commented Feb 10, 2017

Heh, it is documented in Grav: https://learn.getgrav.org/forms/blueprints/advanced-features

@N8Solutions
Copy link

@mahagr & @w00fz I know this has been discussed quite a bit over the years and its obviously not an easy one to fix. Is there any progress in being able to do this, specifically concerning the /gantry/theme.yaml file?

I have really been looking forward to this coming to fruition for quite some time now. I got to thinking about it again due to GDPR as well as recently with issue #2451.

What I'm running in to since GDPR is some sites where customers do not want to use Google Fonts and would prefer to load the fonts locally. However, making that change in the /gantry/theme.yaml file means that every time I update Gantry 5 I have to go in and manually update the /gantry/theme.yaml file.

I also have a couple of sites where I have been loading the fonts from Page Settings using Google Fonts where the customers are not so concerned about GDPR and Google Fonts. However, one of the fonts being used is not rendering properly when the site is viewed in Greek so I had to load it locally via /gantry/theme.yaml. Again, I have to update that file manually whenever I update Gantry 5. This creates more work on my end.

I also know that this was brought up by @alisamii when he opened issue #782 on Sept. 2nd, 2015.

What is the likelihood of this particular issue getting some more attention in 2019?

@mahagr
Copy link
Member

mahagr commented May 16, 2022

@N8Solutions

I've finally implemented a way to use your own custom/gantry/theme.yaml file. I chose to go for a simple solution: if the file exists, it will be used instead of the default file. So if you override the file (or any other file), it is a good idea to check now and then if it has changed. Generally, themes have been very stable and most changes are between larger versions: 5.4 -> 5.5 -> 5.6...

Please check if it now works for you in CI build: https://gantry.org/downloads#ci-builds

PS. make sure you pick the correct file for your CMS.

@N8Solutions
Copy link

Thank you @mahagr! I'll check this out as soon as I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants