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

Non-MD files in the content directory ignores permalinks #1199

Closed
gima opened this Issue Jun 8, 2015 · 11 comments

Comments

Projects
None yet
4 participants
@gima
Copy link

gima commented Jun 8, 2015

Does not work with permalinks.

Files are laid out in a directory path matching the pre-permalink URL, thus effecively ignoring permalinks completely.


Link to the issue adding this feature: #147 (Non-MD files in the content directory (like jpg's and png's) end up as html's)

@bep

This comment has been minimized.

Copy link
Member

bep commented Jun 8, 2015

Permalinks applies to content generated by Hugo.

There will come an extension to this concept that, probably, will let you somehow bundle media files and content files that I guess will cover this one.

@bep bep added the Enhancement label Jun 8, 2015

@gima

This comment has been minimized.

Copy link

gima commented Jun 8, 2015

I do not follow your reasoning. Hugo's job is to generate content from source, and permalinks are a way to facilitate changing the destination of the generated content. The feature #147 was implemented incompletely, or rather, overlooking the effect of permalinks on the generated content.

@bep

This comment has been minimized.

Copy link
Member

bep commented Jun 8, 2015

Yeas, well. #147 was covered if you look at the headline. I agree that there are missing work here, but we do not get that work done by arguing which issue it belongs to.

@gima

This comment has been minimized.

Copy link

gima commented Jun 8, 2015

There is no argument. There is only the fact that you have probably misunderstood what this bug report is about and labelled it incorrectly as a feature request. Make no mistake, this is a bug report for incorrect functionality, don't down-play this.

Let me re-iterate:

  1. A feature request was made in #147 to allow files accompaning a publication to be copied to the same destination directory as the index.html that was generated by hugo.
  2. The feature was implemented, but if permalinks are configured so that the the destination directory is changed for the generated index.html, the accompanying files are still copied to a directory that the index.html would have been generated had there been no permalink configuration in the first place.

Does that sound like a feaure request or an a bug report for an incorrect functionality?

@bep

This comment has been minimized.

Copy link
Member

bep commented Jun 9, 2015

We read the bug report differently, that's fine.

Quote bug report #147: "When I put non-md files in the content directory, they should just be copied over (untouched!)."

That was the fix for #147. Unknown files are just copied over.

@gima

This comment has been minimized.

Copy link

gima commented Jun 9, 2015

Forget it, this is not worth the effort.

@gima gima closed this Jun 9, 2015

@epsitec

This comment has been minimized.

Copy link

epsitec commented Nov 19, 2015

@bep I must agree with @gima that there is an issue. I'd like to be able to put PNG images alongside my blog posts, and get them copied over to the output, as is.

However, when using permalinks for a post found in content/post (blah.md and foo.png), the HTML output of my blog post gets copied to 2015/11/blah/index.html (as expected) whereas the image gets copied to post/foo.png.

This means that I cannot use the same links when editing my files in an editor with active Markdown previewing, and when pushing them through Hugo. That's sad...

@epsitec

This comment has been minimized.

Copy link

epsitec commented Nov 19, 2015

And by the way, if I want the images to be copied info the correct folder, I have to set:

uglyurls = true

Just disabling permalinks is not enough, as the post gets copied to post/blah/index.html and the image to post/foo.png if I don't use uglyurls = true.

@kirtan403

This comment has been minimized.

Copy link

kirtan403 commented Feb 21, 2017

@gima Please reopen the issue. This is something needs to be discussed.

@gima

This comment has been minimized.

Copy link

gima commented Mar 10, 2017

Removing. See below.

@gima gima reopened this Mar 10, 2017

@gima

This comment has been minimized.

Copy link

gima commented Mar 10, 2017

Re-closing and moving comment to more appropriate bug-report (#1768).

@gima gima closed this Mar 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment