mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
docs: clarification for duplicate pathes in case of dedicated search page #678
This commit is contained in:
parent
bf788d8a3e
commit
aa0f4089cb
1 changed files with 7 additions and 1 deletions
|
@ -144,7 +144,7 @@ This will generate a search index file at the root of your public folder ready t
|
|||
|
||||
### Activate dedicated search page
|
||||
|
||||
You can add a dedicated search page for your page by adding the `SEARCHPAGE` outputformat to your home page by adding the following lines in your `config.toml` file.
|
||||
You can add a dedicated search page for your page by adding the `SEARCHPAGE` outputformat to your home page by adding the following lines in your `config.toml` file. This will cause Hugo to generate a new file `http://example.com/mysite/search.html`.
|
||||
|
||||
```toml
|
||||
[outputs]
|
||||
|
@ -155,6 +155,12 @@ You can access this page by either clicking on the magnifier glass or by typing
|
|||
|
||||
![Screenshot of the dedicated search page](search_page.png?&width=60pc)
|
||||
|
||||
{{% notice note %}}
|
||||
To have Hugo create the dedicated search page successfully, you must not generate the URL `http://example.com/mysite/search.html` from your own content. This can happen if you set `uglyURLs=true` in your `config.toml` and defining a Markdown file `content/search.md`.
|
||||
|
||||
To make sure, there is no duplicate content for any given URL of your project, run `hugo --printPathWarnings`.
|
||||
{{% /notice %}}
|
||||
|
||||
## Activate print support
|
||||
|
||||
You can activate print support to add the capability to print whole chapters or even the complete site. Just add the `PRINT` output format to your home, section and page in your `config.toml` as seen below:
|
||||
|
|
Loading…
Reference in a new issue