HUGO

Is There a Difference Where to Pull SEO Data?

I pull some SEO info from a data file but noticed a lot pull from the config or content/_index.md. Is there anything wrong with pulling SEO from a data file? I don’t think it would seeing that the data would still be the same, but just wanted to make sure.

It’s just a practical difference – which is best kind of depends. People with thousands of content files may feel it’s better/easier to manage too edit the SEO data that belongs to a piece of content with that piece of content. If you have a smaller site, that may not be the case. Also, if your SEO values are shared between pages it may also make sense to keep them in e.g. /data to avoid duplication.

Perfect thank you. This is exactly my approach. I only use SEO in data files only when needed.

1 Like

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