I’m migrating a website to a hugo theme, and I’ve mostly finished the homepage. Before I continue, I want to disable some things like the sitemaps, RSS xml files, etc. This is the output when I build the website:
$ hugo
Building sites …
| EN
+------------------+----+
Pages | 18
Paginator pages | 0
Non-page files | 3
Static files | 5
Processed images | 6
Aliases | 4
Sitemaps | 1
Cleaned | 0
Total in 258 ms
The “public” directory looks like this:
public
│ 404.html
│ index.html
│ index.xml
│ sitemap.xml
│
├───authors
│ ├───user1
│ │ avatar.jpg
│ │ avatar_huf02e5d50a52a53a70f7136bfb44f76bd_2065045_150x150_fill_q90_lanczos_center.jpg
│ │ avatar_huf02e5d50a52a53a70f7136bfb44f76bd_2065045_250x250_fill_q90_lanczos_center.jpg
│ │ index.html
│ │ index.xml
│ │
│ ├───user2
│ │ avatar.jpg
│ │ avatar_hu96c3b8f0b5d7436e6b2e1b90d656cca3_2970_150x150_fill_q90_lanczos_center.jpg
│ │ avatar_hu96c3b8f0b5d7436e6b2e1b90d656cca3_2970_250x250_fill_q90_lanczos_center.jpg
│ │ index.html
│ │ index.xml
│ │
│ └───user3
│ avatar.png
│ avatar_hu3f1bb60fbaddb8aa1ca857a1ea0283e4_26632_150x150_fill_lanczos_center_2.png
│ avatar_hu3f1bb60fbaddb8aa1ca857a1ea0283e4_26632_250x250_fill_lanczos_center_2.png
│ index.html
│ index.xml
│
├───css
│ academic.min.d5019aa0d4e10dd08df80508af89deae.css
│
├───img
│ icon-192.png
│ icon-32.png
│ icon-512.png
│
├───js
│ │ academic.min.dc856155b640fa1cd8bd8b7b068fe79c.js
│ │
│ └───vendor
│ └───reveal.js
│ └───plugin
│ └───notes
│ notes.html
│ notes.js
│
└───page
└───1
index.html
These are the contents of sitemap.xml:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>/index.html</loc>
<priority>0</priority>
</url>
<url>
<loc>/index.html</loc>
<priority>0</priority>
</url>
<url>
<loc>/index.html</loc>
<priority>0</priority>
</url>
<url>
<loc>/index.html</loc>
<priority>0</priority>
</url>
<url>
<loc>/authors/user1/</loc>
</url>
<url>
<loc>/authors/user2/</loc>
</url>
<url>
<loc>/authors/user3/</loc>
</url>
<url>
<loc>/</loc>
<priority>0</priority>
</url>
</urlset>
Why are there four entries for index.html?
In my “config/_default/config.toml” file, I have the following settings:
# disable the taxonomy generations
[taxonomies]
tag = ""
group = ""
category = ""
disableKinds = ["taxonomy", "taxonomyTerm", "RSS", "sitemap", "robotsTXT", "404"]
With all of this, I’m confused as to why any of the XML documents are generated as well as the 404.html page. My understanding is that the disableKinds setting would prevent hugo from generating these things. Additionally, what is the “page/1/index.html” doing? It is practically empty other than some metadata.
Unfortunately, these things might be caused by the theme I’m using (https://github.com/gcushen/hugo-academic), but I don’t know enough about the interactions between themes and the overriding “_default” files to understand what’s happening.