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

Check ignoreFiles and contentDir functionality #6262

Closed
onedrawingperday opened this issue Aug 24, 2019 · 2 comments
Closed

Check ignoreFiles and contentDir functionality #6262

onedrawingperday opened this issue Aug 24, 2019 · 2 comments
Labels

Comments

@onedrawingperday
Copy link
Contributor

onedrawingperday commented Aug 24, 2019

Due to the rendering of duplicate content reported in issue gohugoio/hugoBasicExample#52

I have been investigating the use of ignoreFiles and contentDir because the hugoBasicExample serves content that it shouldn't.

The following parameter used to work up until Hugo v.0.56.3 but not anymore.

ignoreFiles = ["content/posts/\\.*","content/portfolio/\\.*","content/product/\\.*","content/sketch/\\.*","content/en/\\.*","content/fr/\\.*"]

Also a little bit of background about the above.

Several theme authors are using /contents/posts for their content files while others /content/post to serve their content files. Typically these post types are hardcoded in list templates.

When the hugoBasicExample was enforced I made these changes to the Themes Site Build Script so that a different config is used if Type posts is found and a different ignoreFiles parameter is used that serves the symlinks under /posts/ and ignores the contents of /post/

At the moment as reported in linked issue above demos have duplicate content in taxonomies when they should not.

Also tried refactoring and splitting the content in two different directories i.e. /content/ and /contentPosts/ so that the first is the default one (and serves the post Type) whereas the second content directory is set in the Build Script if Type posts is detected.

Again I was unable to resolve this. The contentDir parameter seems ignored on my end in Hugo v.0.57.2

@onedrawingperday
Copy link
Contributor Author

onedrawingperday commented Aug 27, 2019

I am closing this issue since the above linked issue was fixed in gohugoio/hugoBasicExample@f3f9fec and gohugoio/hugoThemes/pull/703

I still do not know why I encountered this behavior of contentDir and ignoreFiles. I think that is was due to the way config overwrites happen in Hugo.

In any case I am done investigating and this will be one issue less on my notifications list.

@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 Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant