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

Module conflict with Taxonomies #8866

Closed
cromozooom opened this issue Aug 7, 2021 · 7 comments
Closed

Module conflict with Taxonomies #8866

cromozooom opened this issue Aug 7, 2021 · 7 comments
Assignees
Labels
Milestone

Comments

@cromozooom
Copy link

@cromozooom cromozooom commented Aug 7, 2021

What version of Hugo are you using (hugo version)?

0.87.0

Does this issue reproduce with the latest release?

Yes

Adding Modules in config makes Taxonomies usless:

baseURL = "/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "hugo"

[module]
[[module.imports]]
path = "github.com/cromozooom/gohugo-modules"

[taxonomies]
	category = "categories"
	tag = "tags"
	artwork = "artworks"
	support = "support"
	subject = "subject"

This was reported first time here and It looks like the problem was introduced with v0.84.0.

No problems with v0.83.1.

@jmooring
Copy link
Contributor

@jmooring jmooring commented Aug 7, 2021

Adding Modules in config makes Taxonomies useless:

Specifically, none of the taxonomy sections are rendered in the publish directory.

@ptgott
Copy link

@ptgott ptgott commented Aug 21, 2021

I'm not sure if any work has been done on this issue since the last comment, but it looks like the upstream module github.com/twbs/bootstrap, listed in @cromozooom 's module config, includes taxonomy under disableKinds (https://github.com/twbs/bootstrap/blob/9e1d81a851cac268ca70e95d62c3e968e7293b41/config.yml#L21), which stops the taxonomy pages from rendering.

I'm pretty sure the issue has to do with this commit, which is included in the v0.84.0 release and changes the way module configuration is merged into a Hugo project's configuration (release notes). I haven't dug into the commit at all, but I have some time this weekend to start work on a possible PR.

@ptgott
Copy link

@ptgott ptgott commented Aug 21, 2021

Forgot to note: @cromozooom to fix your issue now, add disableKinds = [] to your config. This will preempt the disableKinds setting for upstream modules.

@cromozooom
Copy link
Author

@cromozooom cromozooom commented Aug 22, 2021

@davidsneighbour
Copy link
Contributor

@davidsneighbour davidsneighbour commented Aug 22, 2021

[[imports]]
path = "github.com/twbs/bootstrap"
disable = false
ignoreConfig = true
ignoreImports = true

for the twbs/bootstrap module solves this.

@bep bep self-assigned this Aug 22, 2021
@bep bep added the Bug label Aug 22, 2021
@bep bep added this to the v0.88 milestone Aug 22, 2021
@bep
Copy link
Member

@bep bep commented Aug 22, 2021

disableKinds = [] to your config. This will preempt the disableKinds setting for upstream modules.

By default, that setting should not be merged in from upstream modules, but it may look like that is what happens ...

bep added a commit to bep/hugo that referenced this issue Aug 22, 2021
Unless the merge strategy is set up to do so.

For `disableKinds` the current workaround is to make sure the project config has an entry, even if is empty:

```
disableKinds = []
```

Note that this issue only touches root, non-map config-values that either is not set in project config or in Hugo's defaults.

Fixes gohugoio#8866
bep added a commit to bep/hugo that referenced this issue Aug 22, 2021
Unless the merge strategy is set up to do so.

For `disableKinds` the current workaround is to make sure the project config has an entry, even if is empty:

```
disableKinds = []
```

Note that this issue only touches root, non-map config-values that either is not set in project config or in Hugo's defaults.

Fixes gohugoio#8866
@bep bep closed this in #8915 Aug 22, 2021
bep added a commit that referenced this issue Aug 22, 2021
Unless the merge strategy is set up to do so.

For `disableKinds` the current workaround is to make sure the project config has an entry, even if is empty:

```
disableKinds = []
```

Note that this issue only touches root, non-map config-values that either is not set in project config or in Hugo's defaults.

Fixes #8866
@davidsneighbour
Copy link
Contributor

@davidsneighbour davidsneighbour commented Aug 22, 2021

That is not the problem (specifically in this case with Bootstrap). Have a look at Bootstrap's config.yml. They do some weird stuff with module imports recursive to their own repo. Disabling the import of their config completely does the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants