From 19bdf72ab1ab227e53dec4b1d79d61d5c8981156 Mon Sep 17 00:00:00 2001 From: "Brian (bex) Exelbierd" Date: Mon, 9 Mar 2026 08:58:51 +0100 Subject: [PATCH] Add custom sidebar content hook Add {% include sidebar-custom.html %} before the closing in sidebar.html, with an empty sidebar-custom.html extension point. Follows the existing pattern of head/custom.html and author-profile-custom-links.html, letting users inject content without shadowing the entire sidebar file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- _includes/sidebar-custom.html | 0 _includes/sidebar.html | 1 + docs/_docs/10-layouts.md | 2 ++ 3 files changed, 3 insertions(+) create mode 100644 _includes/sidebar-custom.html diff --git a/_includes/sidebar-custom.html b/_includes/sidebar-custom.html new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/_includes/sidebar.html b/_includes/sidebar.html index d0228f1cff4d..f701662c5123 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -16,5 +16,6 @@ {% include nav_list locale=locale nav=page.sidebar.nav %} {% endif %} {% endif %} + {% include sidebar-custom.html %} {% endif %} diff --git a/docs/_docs/10-layouts.md b/docs/_docs/10-layouts.md index a2cf7ee7df8d..9aa99d8f4a28 100644 --- a/docs/_docs/10-layouts.md +++ b/docs/_docs/10-layouts.md @@ -663,6 +663,8 @@ sidebar: **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`. {: .notice--info} +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`. + ### Custom sidebar navigation menu 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.