Aliases listed in output, but not used in project

Running the hugo command in my project gives the following output:

+------------------+-----+
  Pages            | 525  
  Paginator pages  |   6  
  Non-page files   | 199  
  Static files     |  16  
  Processed images | 779  
  Aliases          |  27  
  Sitemaps         |   1  
  Cleaned          |   0  

Total in 2788 ms

I’m not using any Aliases in my project. What is Aliases referring to?

The aliases referred at https://gohugo.io/content-management/urls/#aliases.

You can make a shortcode or template to output your aliases, to see them in one list; that’s how folks build .htaccess with such data. :slight_smile:

Thanks, but that wasn’t really what I was after.

Perhaps, my post was not phrased well.

To clarify:

I’m not using Aliases at all in my project. There is no Aliases in the front matter in my content folder. Yet, it appears in the ouput when running the hugo command so I’m trying to figure out what that means.

No Aliases are used, yet output says that they exist in my project. Does that make sense?

Hugo creates some aliases (redirects); language redirects, paginator redirects… But for 27 I think you must have some of your own.

No aliases. Just redid a search in the entire project. The project doesn’t use multiple languages. I do use pagination.

For reference, I’m using v0.58.3.

Yeah, I got that from the topic. What I’m suggesting is a way to directly see what they are, to help you debug. :nerd:


In case others find their aliases ponderous, here’s a shortcode for ya; copy to layouts/shortcodes/whatthealiases.html:

{{  range $p := .Site.Pages -}}
<pre>
<code>
{{ range .Aliases }}
{{  . | printf "%-35s" }}       {{ $p.RelPermalink -}}
{{ end -}}
</code>
</pre>
{{- end -}}

That’s the code from https://gohugo.io/news/http2-server-push-in-hugo/, with some formatting for reading.

On the other hand… disableAliases = true.

1 Like

Sorry, I misunderstood :see_no_evil:

I’ll give this a go and report back any findings. Thank you! :slightly_smiling_face: