Skip to content

Commit 0c2eaef

Browse files
bexelbieCopilot
andauthored
Add custom sidebar content hook (#5448)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent da9f4df commit 0c2eaef

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

_includes/sidebar-custom.html

Whitespace-only changes.

_includes/sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
{% include nav_list locale=locale nav=page.sidebar.nav %}
1717
{% endif %}
1818
{% endif %}
19+
{% include sidebar-custom.html %}
1920
</div>
2021
{% endif %}

docs/_docs/10-layouts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,8 @@ sidebar:
663663
**Note:** Custom sidebar content added to a post or page's YAML Front Matter will appear below the author profile if enabled with `author_profile: true`.
664664
{: .notice--info}
665665

666+
For more advanced customization, create `_includes/sidebar-custom.html` in your site. Its contents are included at the bottom of the sidebar on every page, after the author profile, YAML-defined blocks, and navigation menu. This follows the same pattern as [`head/custom.html`](#custom-head-tags) and `author-profile-custom-links.html`.
667+
666668
### Custom sidebar navigation menu
667669

668670
To create a sidebar menu[^sidebar-menu] similar to the one found in the theme's documentation pages you'll need to modify a `_data` file and some YAML Front Matter.

0 commit comments

Comments
 (0)