docsy icon indicating copy to clipboard operation
docsy copied to clipboard

taxonomy clouds getting displayed even if taxonomyCloud is empty

Open sanketsudake opened this issue 4 years ago • 5 comments

I have set few taxonomies as mentioned below and taxonomyCloud is set to empty. Still, I am seeing taxonomy cloud on my docs and blogs pages.

Also, I wanted to see if there is any way, I can show taxonomy for the blog but not for docs. In this case, I assume I have to edit make a copy of the existing template and edit.

# You can add your own taxonomies
[taxonomies]
# tag = "tags"
category = "categories"
author = "author"

[params.taxonomy]
# set taxonomyCloud = [] to hide taxonomy clouds
taxonomyCloud = []

# # If used, must have same lang as taxonomyCloud
# taxonomyCloudTitle = ["Tag Cloud", "Categories"] 

# # set taxonomyPageHeader = [] to hide taxonomies on the page headers
# taxonomyPageHeader = ["tags", "categories"] 

Essentially it goes in else block here and shows all taxonomies. https://github.com/google/docsy/blob/170cdd9cd31794eac802b0cec083097155feb81b/layouts/partials/taxonomy_terms_clouds.html#L11

I am not sure but probably the else block can be omitted or few additional conditions are required there.

sanketsudake avatar Sep 27 '21 10:09 sanketsudake

@narrenfrei, any ideas?

LisaFC avatar Sep 28 '21 16:09 LisaFC

Hi, I'll take a look. But at the moment I only can't find much time for Docsy.

We have also another issue with taxonomies I'm working on: https://github.com/google/docsy/discussions/698#discussioncomment-1374038

narrenfrei avatar Sep 28 '21 19:09 narrenfrei

If you only want to remove the taxonomy cloud but keep the taxonomies, I have found a workaround by commenting out one taxonomy in the config file and then adding a new one that is not used. Not the most elegant but it works.

norrissc avatar Nov 23 '22 15:11 norrissc

You can probably hide it from your project css file by setting the display: none; for the taxonomy class.

fekete-robert avatar Nov 23 '22 15:11 fekete-robert

In fact, the bug is in the comment. To disable Tag Cloud :

taxonomyCloud = [""]

jxdm-dmoreau avatar Apr 29 '25 13:04 jxdm-dmoreau