mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 18:37:05 +08:00
docs: clarification for duplicate pathes in case of dedicated search page #678
This commit is contained in:
parent
bf788d8a3e
commit
aa0f4089cb
@ -144,7 +144,7 @@ This will generate a search index file at the root of your public folder ready t
|
|||||||
|
|
||||||
### Activate dedicated search page
|
### 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
|
```toml
|
||||||
[outputs]
|
[outputs]
|
||||||
@ -155,6 +155,12 @@ You can access this page by either clicking on the magnifier glass or by typing
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
{{% 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
|
## 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:
|
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…
x
Reference in New Issue
Block a user