I just found out category page was indexed by google and I don’t use taxonomies. Adding disableKinds = ["taxonomy", "term"]
is not working (or I am not sure how it should work) because opening example.com/categories
opens a page without the body, but with the header and footer. Do I have to create a folder for categories and disable it with build options?
I am unable to reproduce the problem:
hugo new site foo
cd foo
hugo
tree public
result
public/
├── categories/
│ └── index.xml
├── tags/
│ └── index.xml
├── index.xml
└── sitemap.xml
Now do…
echo "disableKinds = ['taxonomy','term']" >> hugo.toml
rm -rf public
hugo
tree public
result:
public/
├── index.xml
└── sitemap.xml
This is happening with hugo server
.
Did you clear the public directory after making the change?
Yes. Same issue.
Like I said, unable to reproduce the problem, even with hugo server. Not sure what you’re doing. The “disableKinds” setting works as expected.
Maybe a simple typo?
It works now. But not until I run hugo server --renderToMemory
. I deleted the public folder a few times. Even run hugo --gc
a few times. I even opened the server in incognito window…
You had something cached somewhere; maybe in your browser. Provided you clear the public directory, there is absolutely no need to render to memory.
I even tested in incognito. But somehow it only worked after rendering to memory.
Did you check what was in your public
directory? That should be the decisive information.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.