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

How should we handle global template variables? #114

Open
allejo opened this issue Dec 21, 2019 · 1 comment
Open

How should we handle global template variables? #114

allejo opened this issue Dec 21, 2019 · 1 comment
Labels
Meta Administrative stuff for the project RFC We need feedback on a topic

Comments

@allejo
Copy link
Member

allejo commented Dec 21, 2019

Since the release of 0.2.0, the following template variable names are reserved and managed by stakx.

  • this
  • site
  • data
  • collections
  • menu
  • pages
  • repeaters

PR #113 introduces a new redirects global variable, which could conflict with any existing templates that use redirects as a variable name; this is a huge problem for BC. How should this be handled?

  1. Follow Jekyll and stuff everything into site
    • However, this poses the exact same problem but with site conflicting with configuration file keys.
  2. Global variables are prefixed so they become stakx_site or stakx.site
  3. Cross our fingers and hope no one complains or has used redirects as a variable name
@allejo allejo added Meta Administrative stuff for the project RFC We need feedback on a topic labels Dec 21, 2019
@The-Noah
Copy link

I think the second option is a good choice. Perhaps when an option is chosen instead of removing the old ones immediately, give a warning saying it will be removed in the next major release (with steps to fix it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meta Administrative stuff for the project RFC We need feedback on a topic
Projects
None yet
Development

No branches or pull requests

2 participants