-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hugo: Allow preselected tags on search
Adds a feature to allow tags to added to the search widget. These will be preselected tags, but can be manually removed after by the user. To test and compare, see: https://cuelang.org/examples/shortcodes/search/ Fixes cue-lang/cue#3394 Signed-off-by: Wies de Graaf <[email protected]>
- Loading branch information
1 parent
f0e0f0f
commit 3963a41
Showing
7 changed files
with
47 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{{- $contentType := .Get "contentType" | default "" -}} | ||
{{- $showContentTypes := .Get "showContentTypes" | default true -}} | ||
{{- $preselectedTags := .Get "tags" | default "" -}} | ||
|
||
{{- partial "search" (dict | ||
"type" "widget" | ||
"contentType" $contentType | ||
"showContentTypes" $showContentTypes | ||
"preselectedTags" $preselectedTags | ||
"context" . | ||
) -}} |