Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong alias root for other HTML output formats (e.g. AMP) #5760

Closed
bep opened this Issue Mar 17, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@bep
Copy link
Member

commented Mar 17, 2019

I was reading some code and test related to this, and the alias path for the AMP type of output formats looks wrong. We create redirect pages for all HTML type of Output Formats. So for:

public/page/index.html
public/amp/page/index.htm

With an alias definition of /myalias you would currently get:

public/myalias/index.html
public/myalias/amp/index.html

We have test cases for the above, but to me that looks surprising and obviously wrong.

I would expect:

public/myalias/index.html
public/amp/myalias/index.html

@bep bep added the Bug label Mar 17, 2019

@bep bep added this to the v0.55 milestone Mar 17, 2019

@bep

This comment has been minimized.

Copy link
Member Author

commented Mar 17, 2019

@regisphilibert could you have quick look at the above and tell me if you agree.

@regisphilibert

This comment has been minimized.

Copy link

commented Mar 17, 2019

This is news to me as I'm fairly unexperienced with HTML output format with a path set, AMP included, maybe others will have more use cases to build an opinion upon.

To me though:
If we follow the AMP recommended URL structure which have you recreate a sort of "alternate" site, yes, the correction you want tot make is needed.
But for any other HTML output format, the current behaviour is, I think, adapted to the user's expectation.

If this correction is limited to AMP, then I agree, if this is for every HTML output formats with a path set, then no I don't agree.

@regisphilibert

This comment has been minimized.

Copy link

commented Mar 18, 2019

I just found out that the path setting's value is added at the root fo the URL for every HTML (or isHtml = true) output formats.

I was not understanding the path setting properly.

@bep

This comment has been minimized.

Copy link
Member Author

commented Mar 18, 2019

If this correction is limited to AMP, then I agree, if this is for every HTML output formats with a path set, then no I don't agree.

This is relevant for all HTML output formats with PATH set (which is kind of very AMP specific).

@bep bep closed this in f9d6fec Mar 30, 2019

nguyenvanduocit added a commit to 12bitvn/hugo that referenced this issue Apr 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.