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

Setting url in front matter does nothing #342

Closed
krig opened this issue Jun 24, 2014 · 6 comments
Closed

Setting url in front matter does nothing #342

krig opened this issue Jun 24, 2014 · 6 comments
Milestone

Comments

@krig
Copy link
Contributor

krig commented Jun 24, 2014

According to the documentation, setting the url in the front matter should override the resulting generated path. This doesn't happen.

I have a document named content/404.md with this:

+++
url = "/404.html"
+++

#404

but the resulting document is /404/index.html, not /404.html.

@spf13
Copy link
Contributor

spf13 commented Jul 1, 2014

The issue here is that setting url is still respecting prettyUrls and it shouldn't

@mbertschler
Copy link

I was having the same issues like in Issue #330
I tried to solve the homepage-as-content problem by using url = "/" and url = "/index.html"

Using the url as is if it ends in .html would fix this issue too (so I could make my homepage with url="/index.html")

Something else: the file file.md with url="/file2/" is generated twice, in the folder /file/ and in /file2/
Is this expected behaviour or should I file a bug for that?

@natefinch
Copy link
Contributor

@mbertschler please file a bug for the double generation behavior.... no content should get generated twice.

@mbertschler
Copy link

@natefinch I can't reproduce this bug after deleting the /public directory, probably it was caused by hugo not cleaning the directory as I was playing around with different front matter arguments.
There is already an issue #379 for that. At least for a newbie this behaviour is pretty confusing...

@spf13
Copy link
Contributor

spf13 commented Aug 25, 2014

Closing as it's already captured in #330 and #379 as mentioned.

@spf13 spf13 closed this as completed Aug 25, 2014
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants