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

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

Closed
gima opened this issue Jun 8, 2015 · 12 comments
Closed

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

gima opened this issue Jun 8, 2015 · 12 comments

Comments

@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
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
Copy link
Author

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
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
Copy link
Author

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 Non-MD files in the content directory (like jpg's and png's) end up as html's #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
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
Copy link
Author

gima commented Jun 9, 2015

Forget it, this is not worth the effort.

@gima gima closed this as completed Jun 9, 2015
@epsitec
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
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
Copy link

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

@gima
Copy link
Author

gima commented Mar 10, 2017

Removing. See below.

@gima gima reopened this Mar 10, 2017
@gima
Copy link
Author

gima commented Mar 10, 2017

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

@gima gima closed this as completed Mar 10, 2017
@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 Mar 25, 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