Make redirects/aliases use templates

I’d like to add a style to my redirects/aliases because I’m using a dark theme and my screen goes bright white for a split second whenever I open a redirect link. I was hoping it would work to add a file to my-theme/templates/alias.html or my-theme/templates/internal/alias.html sorta like how the 404.html replacement works, but no luck. It seems alias.html is different from the other built-in templates, is there a reason why?

Edit: quick code mockup that does what I’m looking for: Make alias templatable · jaxter184/zola@217f56b · GitHub

I successfully added styles/changed the content of the alias template. It’s in my theme’s templates/internal/alias.html.

One caveat is that you can’t access the config values, but other than that, it works.

Does nothing change at all when you change the contents of that template?

1 Like

Oh wow, I’m not sure what I was doing wrong before, but I tried again and it worked fine. Maybe I had a typo or something. Sorry for the noise, and thanks for your reply. Is there a way to mark the thread as being resolved?

1 Like