Skip to content

Commit

Permalink
docs: clarify serving use cases
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Feb 24, 2024
1 parent 6d900dd commit 1427f10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion exampleSite/content/basics/customization/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ If your site is served from a subfolder, eg. `https://example.com/mysite/`, you
baseURL = "https://example.com/mysite/"
````


## Serving your page from the filesystem

If you want your page served from the filesystem by using URLs starting with `file://` you'll need the following configuration in your `hugo.toml`:
Expand All @@ -35,6 +34,12 @@ Sublemental pages (like `sitemap.xml`, `rss.xml`) will always be generated with
If you want to use the search feature from the file system, migrating from an older installation of the theme, make sure to change your outputformat for the homepage from the now deprecated `json` to `search` [as seen below](#activate-search).
{{% /notice %}}

{{% notice warning %}}
[Serving your page from a subfolder](#serving-your-page-from-a-subfolder) and [Serving your page from the filesystem](#serving-your-page-from-the-filesystem) are mutally exclusive due to the fact, that [Hugo does not apply the `baseURL` correctly](https://github.com/gohugoio/hugo/issues/12130).

If you need both, you have to generate your site twice but with different settings into separate directories.
{{% /notice %}}

## Activate search

If not already present, add the following lines in your `hugo.toml` file.
Expand Down

0 comments on commit 1427f10

Please sign in to comment.