theme: Don't exclude current section from related content

This commit is contained in:
Joe Mooring 2025-08-26 06:19:15 -07:00 committed by GitHub
parent 1386d8ed24
commit 1d9a92bc7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View File

@ -2,7 +2,7 @@
title: transform.CanHighlight title: transform.CanHighlight
description: Reports whether the given code language is supported by the Chroma highlighter. description: Reports whether the given code language is supported by the Chroma highlighter.
categories: [] categories: []
keywords: [] keywords: [highlight]
params: params:
functions_and_methods: functions_and_methods:
aliases: [] aliases: []

View File

@ -2,7 +2,7 @@
title: transform.HighlightCodeBlock title: transform.HighlightCodeBlock
description: Highlights code received in context within a code block render hook. description: Highlights code received in context within a code block render hook.
categories: [] categories: []
keywords: [] keywords: [highlight]
params: params:
functions_and_methods: functions_and_methods:
aliases: [] aliases: []

View File

@ -1,6 +1,5 @@
{{- $heading := "See also" }} {{- $heading := "See also" }}
{{- $related := site.Pages.Related . }} {{- $related := site.Pages.Related . | first 7}}
{{- $related = $related | complement .CurrentSection.Pages | first 7 }}
{{- with $related }} {{- with $related }}
{{ $.Store.Set "hasRelated" true }} {{ $.Store.Set "hasRelated" true }}