Resolving BreadcrumbList error in Google Search Console #1024
-
Hi, First off, thanks for a wonderful Hugo theme. It has saved me from a whole load of extra work documenting my app for which I'm eternally grateful. To my issue... I have checked Google Search Console to verify my site can be crawled and found a critical issue has been flagged up: 'Missing field "itemListElement"' 'type BreadcrumbList'. Now my site is pretty much a vanilla implementation so includes breadcrumbs in the top bar. I've had a look at the breadcrumbs.html in partials, and whilst I have no clue how to read the code, can see there is a reference to itemListElement which makes me think I might have a problem with my configuration... perhaps? As an interim measure, and because I have no clue what the source of the Google issue is, I've disabled every breadcrumb setting in hugo.toml, e.g: Google is happy for the moment, but I'd like to fix this but don't know enough about Hugo to do so. Would someone please give me some troubleshooting pointers. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 8 replies
-
Thanks for the praise. I am happy, this project is useful for you. I do not have used Google Search Console yet, but the schema.org validator for https://validator.schema.org/#url=https%3A%2F%2Fmcshelby.github.io%2Fhugo-theme-relearn%2FexampleSite%2Flog%2Ffirst-day%2Findex.html does not show any errors. As I just set up Google Search Console to test your issues, it does not contain much data until tomorrow. Can you show me (in a screenshot) the menu topic to reach this error message? I'll try to replicate this with the docs page. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the prompt reply. Although I don't think I will need access to your repo, it could speed up things in case I'll unexpectedly need it and you're not around. So, yes, access to your repo is appreciated. Let's wait a day until Google Search Console has prepared my files for further inspection. |
Beta Was this translation helpful? Give feedback.
-
I haven't verified my assumption, but for me it seems that the complaint is only for the home page and not any of the sub pages. This is most likely because the theme announces a breadcrumblist but doesn't fill it. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick fix. I'll sit tight to see it works out OK before I update the theme.
…-------- Original Message --------
On 16/02/2025 20:53, Sören Weber wrote:
I've made an issue for this -> [#1026](#1026)
—
Reply to this email directly, [view it on GitHub](#1024 (reply in thread)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AEBEF7HQOPSQQDY6VDJ4W6L2QD3ELAVCNFSM6AAAAABXG2ZSAWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMRRG43DCMI).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The theme can only generate breadcrumbs for pages that contain a title. In your case, your home page does not have a title and so it will be missing from the breadcrumbs. In general it is seldomly a good idea to leave out the title. If you don't want the root breadcrumb to be displayed in the header of your site, set |
Beta Was this translation helpful? Give feedback.
-
I just revised my thoughts. Although I still think every page that should be displayed should also have a title, I've opened #1027. It was always meant to fallback to the site title for the home page if the front matter does not contain a title. This should fix your issue without any further reconfiguration on your side. |
Beta Was this translation helpful? Give feedback.
The theme can only generate breadcrumbs for pages that contain a title. In your case, your home page does not have a title and so it will be missing from the breadcrumbs.
In general it is seldomly a good idea to leave out the title.
If you don't want the root breadcrumb to be displayed in the header of your site, set
disableRootBreadcrumb=true
in yourhugo.toml
but give your home page a title, so the the generated schema.org spec is generated correctly.