runhide
December 3, 2019, 12:31pm
1
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?
maiki
December 3, 2019, 6:47pm
2
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.
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?
bep
December 3, 2019, 8:06pm
4
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.
maiki
December 3, 2019, 10:14pm
6
Yeah, I got that from the topic. What I’m suggesting is a way to directly see what they are, to help you debug.
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
runhide
December 4, 2019, 12:56pm
7
Sorry, I misunderstood
I’ll give this a go and report back any findings. Thank you!