Skip to content

Commit

Permalink
fixup! search: exclude older manual page versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dscho committed Sep 10, 2024
1 parent e53dcb4 commit 6cf3252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h1>{{ .Params.book.section.cs_number }} {{ .Params.book.chapter.title }} - {{ .
</div>

<!-- older manual page versions are less interesting and need to be excluded from the search -->
{{ $include_in_search := (or (not (isset .Params "docname")) (isset .Params "latest-changes")) }}
{{ $include_in_search := (or (not (isset .Params "docname")) (isset .Params "latest-changes") (isset .Params "lang")) }}
<div id="main"{{ if $include_in_search }} data-pagefind-filter="category:{{ $section }}" data-pagefind-meta="category:Reference" data-pagefind-weight="0.05" data-pagefind-body{{ end }}>
{{ .Content }}
{{ $match := findRESubmatch "(?s)>NAME</h2>.*?<p[^>]*>(git-)?([^ ]+)" .Content 1 }}
Expand Down

0 comments on commit 6cf3252

Please sign in to comment.