From 1d9a92bc7f5565180004c45a1804691325b8d80c Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Tue, 26 Aug 2025 06:19:15 -0700 Subject: [PATCH] theme: Don't exclude current section from related content --- content/en/functions/transform/CanHighlight.md | 2 +- content/en/functions/transform/HighlightCodeBlock.md | 2 +- layouts/_partials/layouts/related.html | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/content/en/functions/transform/CanHighlight.md b/content/en/functions/transform/CanHighlight.md index c00445605..5e3b04a81 100644 --- a/content/en/functions/transform/CanHighlight.md +++ b/content/en/functions/transform/CanHighlight.md @@ -2,7 +2,7 @@ title: transform.CanHighlight description: Reports whether the given code language is supported by the Chroma highlighter. categories: [] -keywords: [] +keywords: [highlight] params: functions_and_methods: aliases: [] diff --git a/content/en/functions/transform/HighlightCodeBlock.md b/content/en/functions/transform/HighlightCodeBlock.md index bbebf9459..2fc0b6f37 100644 --- a/content/en/functions/transform/HighlightCodeBlock.md +++ b/content/en/functions/transform/HighlightCodeBlock.md @@ -2,7 +2,7 @@ title: transform.HighlightCodeBlock description: Highlights code received in context within a code block render hook. categories: [] -keywords: [] +keywords: [highlight] params: functions_and_methods: aliases: [] diff --git a/layouts/_partials/layouts/related.html b/layouts/_partials/layouts/related.html index dac5b8d5b..9c0146c88 100644 --- a/layouts/_partials/layouts/related.html +++ b/layouts/_partials/layouts/related.html @@ -1,6 +1,5 @@ {{- $heading := "See also" }} -{{- $related := site.Pages.Related . }} -{{- $related = $related | complement .CurrentSection.Pages | first 7 }} +{{- $related := site.Pages.Related . | first 7}} {{- with $related }} {{ $.Store.Set "hasRelated" true }}