You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
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.The fix
Simply add
hyde:
first in the file.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 theconfig/hyde.php
file. The namespace feature is only loaded when you explicitly specify that namespaces should be used (by adding thehyde:
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 thehyde.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
The text was updated successfully, but these errors were encountered: