Skip to content

Commit 9806362

Browse files
authored
Merge pull request #23 from nkdAgility/fix-for-trasalted-lists
Fix for transalted guyides
2 parents 6195ae1 + aa52e6e commit 9806362

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

module/layouts/_partials/functions/get-guide-translations-for-version.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@
8888
{{ $hasPage := false }}
8989
{{ if $page }}
9090
{{ $hasPage = true }}
91-
{{/* Check if page has content */}}
92-
{{ $hasContent = and $page.Content (ne (trim $page.Content " \n\r\t") "") }}
91+
{{/* Check if page has actual content by checking plain text content and word count */}}
92+
{{ $plainContent := trim $page.Plain " \n\r\t" }}
93+
{{ $hasContent = and (gt $page.WordCount 0) (ne $plainContent "") }}
9394
{{ end }}
9495

9596
{{/* Check if PDF is available and get PDF path */}}

0 commit comments

Comments
 (0)