Reputation: 1145
By default, Hugo exposes its site map at /sitemap.xml
; due to my proxy setup, I need to expose it at /static-content/sitemap.xml
.
My initial approach was to utilize the capability to set the sitemap URL front mater; however, I cannot figure out how create a file in the content directory that will be picked up when rendering the sitemap.
Upvotes: 0
Views: 1065
Reputation: 1791
You can configure the sitemap filename in your Hugo config file. I just tried the following in my config.yaml.
sitemap:
filename: static-content/sitemap.xml
And it worked! This is documented in https://gohugo.io/templates/sitemap-template/
Upvotes: 1