Skip to content

Can't set relative aliases for home page #13346

@BrianLeishman

Description

@BrianLeishman

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.143.0-DEV-13b208e2f70fd0bfad8a4ae33a30afb5fd4b7477+extended linux/amd64 BuildDate=2025-01-31T08:29:10Z

Does this issue reproduce with the latest release?

Yes


Related issue about multi language sites and relative aliases here: #5757

I have a multi language site where I am trying to set the alias of a home page in the front matter like so:

---
title: Welcome to our cool website!
layout: single

aliases:
  - welcome
---

# My cool website

And while this works page bundle pages correctly (it's relative to the "parent" directory of the (_)index file), this seems to be causing this bug on the root/site home page, throwing this error:

render: alias "../welcome" traverses outside the website root directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions