search: create search index and page from template and content adapter

This commit is contained in:
Sören Weber 2024-08-26 23:07:33 +02:00
parent e1a1f01f4c
commit d9e69db2f1
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
18 changed files with 129 additions and 103 deletions
exampleSite/content/basics/customization

View file

@ -61,7 +61,7 @@ If not already present, add the following lines in your `hugo.toml` file.
{{< multiconfig file=hugo >}}
[outputs]
home = ["html", "rss", "search"]
home = ["html", "rss"]
{{< /multiconfig >}}
This will generate a search index file at the root of your public folder ready to be consumed by the Lunr search library.
@ -72,7 +72,7 @@ You can add a dedicated search page for your page by adding the `searchpage` out
{{< multiconfig file=hugo >}}
[outputs]
home = ["html", "rss", "search", "searchpage"]
home = ["html", "rss"]
{{< /multiconfig >}}
You can access this page by either clicking on the magnifier glass or by typing some search term and pressing `ENTER` inside of the menu's search box .
@ -91,7 +91,7 @@ You can activate print support to add the capability to print whole chapters or
{{< multiconfig file=hugo >}}
[outputs]
home = ["html", "rss", "print", "search"]
home = ["html", "rss", "print"]
section = ["html", "rss", "print"]
page = ["html", "rss", "print"]
{{< /multiconfig >}}