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

Namespaced Yaml configuration not loading #1475

Closed
caendesilva opened this issue Nov 26, 2023 · 0 comments
Closed

Namespaced Yaml configuration not loading #1475

caendesilva opened this issue Nov 26, 2023 · 0 comments

Comments

@caendesilva
Copy link
Member

Note

This is a wiki post for a known issue, intended to help others with this issue

The issue

When adding the following to the hyde.yml file, the sidebar header will be ignored.

docs:
  sidebar:
    header: "My site name"

The fix

Simply add hyde: first in the file.

hyde:
docs:
  sidebar:
    header: "My site name"

Why this happens

This happened due to the way namespaced Yaml configuration works. In the invalid example, Hyde doesn't know that you want to use a namespace, instead it thinks you are trying to use a setting called docs.sidebar.header in the config/hyde.php file. The namespace feature is only loaded when you explicitly specify that namespaces should be used (by adding the hyde: key).

Why this hasn't been fixed

You may be wondering, "if we know what the issue is, why don't we fix it?" and that is 100% valid. The short answer is simple: I honestly don't know how. We could check if the file starts with a known namespace, but that may not work well. Consider if the user actually has added a config key called docs.sidebar.header in the hyde.php config file. What do we do then? If you reading this have an idea of how we can solve this problem, please let me know!

See more on the docs: https://hydephp.com/docs/1.x/customization#namespaced-yaml-configuration

caendesilva added a commit that referenced this issue Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant