-
-
Notifications
You must be signed in to change notification settings - Fork 136
Inconsistent Sidebar Naming in _config.ym #873
Description
Page URL
https://github.com/precice/precice.github.io/blob/master/_config.yml
What is wrong?
Bug Description
There is an inconsistent naming convention for the tutorial sidebar in _config.yml. The sidebar is referenced as tutorial_sidebar in the page defaults configuration, but listed as tutorials_sidebar in the sidebars declaration list.
Location
File: _config.yml
-
Singular usage (lines 98, 110):
- scope: path: "content/tutorials" type: "pages" values: layout: "page" sidebar: tutorial_sidebar # <-- singular - scope: path: "imported/tutorials/" type: "pages" values: layout: "page" sidebar: tutorial_sidebar # <-- singular
-
Plural usage (line 239):
sidebars: - home_sidebar - docs_sidebar - tutorials_sidebar # <-- plural - community_sidebar
Expected Behavior
All references to the tutorial sidebar should use a consistent naming convention. Since the actual sidebar file is named tutorial_sidebar.yml (singular) and all page defaults use the singular form, the entry in the sidebars: list should be changed to tutorial_sidebar.
Proposed Fix
Change line 239 in _config.yml:
sidebars:
- home_sidebar
- docs_sidebar
-- tutorials_sidebar
+- tutorial_sidebar
- community_sidebarImpact
While Jekyll may currently handle this without visible errors due to how the sidebar data files are loaded, this inconsistency:
- May cause confusion for new contributors
- Could lead to issues with sidebar validation or iteration
- Violates the principle of consistent naming conventions
Checklist
- Verify the sidebar file is named
tutorial_sidebar.yml(nottutorials_sidebar.yml) - Update line 239 in
_config.ymlto use singular form - Test that tutorials section still renders correctly
- Check if any other references to
tutorials_sidebarexist in the codebase