Pages with "render: never" get rendered, disableKinds not disabling kinds

repo: GitHub - prolocomontopoli/sito_proloco_montopoli

Take for example the page in content/it/pages/services:

---
title: 'Caratteristiche'
url: '/caratteristiche'
description: 'Le caratteristiche del tema spiegate.'
draft: false
translationKey: services
type: 'pages'
layout: 'services'
build:
  render: 'never'
  list: 'never'
---

This have the option to disallow building and rendering for this page, but if I got to my website to the page “/caratteristiche” I still see the page..

Same thing goes for tags, in my config.tomlI have tags disabled with:

disableKinds = ['taxonomy', 'term']

Yet if I browse whatever page on the website, it is shown: both the /tags and single tag pages, these are even shown in sitemap!

Any hint on what I might be doing wrong?

First thought: did you clear the publishDir after making these changes?

I looked at your repository: you have the publishDir under source control, so it isn’t cleared. Don’t do that. To fix:

  1. Add public/ to your .gitignore file
  2. git rm -rf public && git add -A && git commit -m "Remove public dir from source control" && git push

I just edited the above to use git rm instead of rm.

This worked well for the pages which had the option render: never, but tags pages are still getting rendered, as well as the “/tags” section (?).

I don’t know what I might be missing, pheraps even single tags pages or tags sections should have render: never even if disableKinds = ['taxonomy', 'term'] is enabled?

Pheraps should I enable ignoreFiles= ['tags/*'] ? But what does exactly disableKinds does then?

website is https://montopoli.eu

NO.

NO.

If you build the site locally, CLEARING THE PUBLIC DIRECTORY FIRST, do you see a public/tags directory?

Hi again thank you so much for your answers.

Yes, if I clear the public directory and then I build locally I see a public/tags directory.

Look closely at your site config. You’ve placed the disableKinds key under the params key. It needs to be in the root.

You’ve also configured your site so that “tags” is not a taxonomy, so your content/it/tags directory does not contain taxonomy or term pages.

This fixed it, if I include a `[taxonomy]` setting I must be sure to include existing taxonomies because otherwise the “tags” directory is not seen as a taxonomy by the config file, right?

But in the case I simply do not specify custom taxonomies, will my theme still see custom tags manually created under the tags/ directory?

If you have a content directory named “tags” and you want it to be treated as a taxonomy named “tags” you must either (a) omit the taxonomies key from your site configuration resulting in default taxonomies of “tags” and “categories”, or (b) explicitly define a “tags” taxonomy, e.g.

[taxonomies]
tag = "tags"

Thank you so much! Now everything’s clear, I’ve also updated the free theme I made for this website thanks to these indications: GitHub - ololiuhqui/magnolia-free-hugo-theme at exampleSite

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.