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

Ability to include PITCHME.yaml files #277

Open
satano opened this issue Nov 11, 2019 · 4 comments
Open

Ability to include PITCHME.yaml files #277

satano opened this issue Nov 11, 2019 · 4 comments

Comments

@satano
Copy link

satano commented Nov 11, 2019

It would be nice to have an ability to include another PITCHME.yaml in PITCHME.yaml.

Implementation

Just use simple include key with path to another PITCHME.yaml. For simplicity and consistency with other features, the path is relative to the repository root: include: PITCHME.yaml

Reasoning

Some settings in PITCHME.yaml can be specific for presentations, som other settings can be global.

For example there will be master PITCHME.yaml in the root of the repository, where will be specified colors, fonts, code highlighting style, custom CSS etc. In general there would be global design/theme settings.

And there will be another PITCHME.yaml next to the presentation itself (next to PITCHME.md). In this yaml file, we can just include the master yaml and add/update other setting. For example:

include: PITCHME.yaml # Global settings for all my presentsations.

# Every presentation has its own title.
title: My Super Presentation

# I want different logos for different presentations, or maybe I do not want any logo in some.
logo: https://example.com/path/to/logo.png

Things to consider

  • Depth of including. Again for simplicity, I believe that it is enough to support just one level of include (the same as including PITCHME.md files). So included PITCHME.yaml cannot contain include key.
  • In general, I think that mostly the include will be at the begining of the file. But i should be clear the behavior if the include is somewher in the middle. Possibilities:
    • Force the include (if present) to be the first key in .yaml. Show error if it is not the case.
    • Allow include to be anywhere, but always process it first. So local settings will always override global settings, even if they are before the include.
    • Allow include to be anywhere and process the files from top to bottom. So process settings in local file, then include global file and process that - it may override already set settings. Then process the rest of local file, which will override any previous settings. This is probably the expected behavior.
@gitpitch
Copy link
Owner

Hi Stano, thanks for submitting this interesting feature request. And for providing a clear, detailed description. My gut reaction, very nice idea. I don't know when I can get to this but for right now I'll simply keep the thread open to see if others in the GitPitch community also express interest in this feature with an up-vote or additional commentary. Lets see what happens. Cheers, David.

@jesfer
Copy link

jesfer commented Dec 15, 2019

This would be very useful for modular courseware slides. I could have a master yaml to keep a consistent look and feel to all my courses but override logo or footer with something course specific.

@gitpitch
Copy link
Owner

Thanks for the additional input @jesfer.

@smwilson1230
Copy link

I also see this a very nice to have. For a full level course where you will have several modules having a global look and feel while having separate details for individual modules would be very nice.

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

4 participants