Use custom output format for search index
This commit is contained in:
		
							
								
								
									
										17
									
								
								layouts/_default/home.paige-search.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								layouts/_default/home.paige-search.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| {{- $page := . -}} | ||||
|  | ||||
| {{- $page.Scratch.Add "paige_index" slice -}} | ||||
|  | ||||
| {{- range where site.RegularPages "Params.paige.search.hide_page" "ne" true -}} | ||||
|     {{- $page.Scratch.Add "paige_index" (dict | ||||
|         "categories" .Params.categories | ||||
|         "date" .PublishDate | ||||
|         "description" (.Description | markdownify | plainify | htmlUnescape) | ||||
|         "keywords" .Params.keywords | ||||
|         "link" .RelPermalink | ||||
|         "tags" .Params.tags | ||||
|         "text" (strings.TrimRight " " (replace (.Plain | htmlUnescape) "\n" " ")) | ||||
|         "title" (.Title | markdownify | plainify | htmlUnescape)) -}} | ||||
| {{- end -}} | ||||
|  | ||||
| {{- $page.Scratch.Get "paige_index" | jsonify -}} | ||||
		Reference in New Issue
	
	Block a user