CMS SEO Question: How are individual CMS article pages intended to be indexed by Google?

Thank you : )

It works now !!!

item. always needs to be included.

If that isn’t set, the whole thing doesn’t work.

By the way, I would generally recommend putting everything that should be output in the frontmatter in quotation marks.

So always:

author: "Jolyon Yates"

image:
    src: ""
    alt: ""
    title: ""

I would also put the individual tags in quotes. The quotation marks around the individual values are useful because YAML can otherwise misinterpret certain words or characters.

OK - great … work for tomorrow : )

Night night and many thanks

  • getting unstuck now !!

Jumping into this thread as I’m hitting the exact {{item.canonicalUrl}} issue, Elements 2.4.4.

Following the fix above, I’ve added {{item.canonicalUrl}} to my article Item page → Meta Tags → Canonical URL field. The item. prefix is there, no stray spaces.

On the published site, viewing source on a live article URL (with a real ?item= slug loaded, article rendering correctly), the canonical still outputs the literal string:

<link rel="canonical" href="{{item.canonicalUrl}}" />

The body variables ({{item.title}}, {{item.body}}) all render perfectly on the same page — so the Item template itself is working. It’s only the Meta Tags panel that isn’t evaluating the token.

The one thing I think might be relevant: my articles are created and managed entirely through the ECMS Online Editor, not as hand-written .md files in the desktop app. Pegasus, you mentioned earlier that a custom-frontmatter setup “is not suitable if you are using the online editor” — could the Online Editor be the reason item.canonicalUrl isn’t populating here? And if so, is there a recommended way to get per-article canonicals working when the content is Online-Editor-managed?

Happy to share screenshots of the setup, or the project, whichever’s easiest. Thanks — this thread’s already been a huge help.

guys, pls check your setup.

The syntax {{ item.canonicalUrl }} should work independently of whether you are using the app editor or the Online Editor.

This syntax was specifically added to make sure that blog articles can finally be made indexable properly.

The important thing is that you enable “Use Item for Meta-Data” in the CMS item for your blog post entries.

That is not quite what I meant.

I only said that my somewhat extravagant YAML frontmatter version, with all the extra bells and whistles, is probably not ideally suited for this use case.

The reason is that this kind of setup should really only be used as a template if you plan to manage your Markdown files directly through the app.

If you want to use the Online Editor, then at the moment you should use a much flatter YAML mapping structure instead. This is because more complex YAML mapping structures currently cannot really be represented properly in the Online Editor.

Thanks Pegasus, that’s a useful distinction — flat for the Online Editor, nested only if you’re managing the files in the app directly. Our frontmatter is already flat, so I don’t think the mapping structure is what’s tripping us up here.

I think the canonical problem sits a layer below that. Even with a flat canonicalUrl key, the token renders as the literal string {{item.canonicalUrl}} on the live page — and the same happens to og:title and og:url. From thread 51033 it looks like Ben’s confirmed the CMS can’t currently set a per-item canonical on a shared single-item page — the head’s built without the item in scope — and it’s on the list to fix.

Does that match your understanding? Or is there a way to get the item into the head that I’ve missed?

That is probably how it has to be. If {{ item.canonicalUrl }} is used correctly, it should work.

At least, I have not had any problems with it in any of my projects.

Also, {{ item.canonicalUrl }} is the built-in syntax provided by the system.

In general, you also have the option to create your own syntax for outputting the canonical URL. However, that depends on how your front matter is configured and whether the canonical URL is actually defined there.

In summary: the {{ item.canonicalUrl }} syntax should work when used correctly. If it does not output anything, the setup is most likely not configured properly.

Without access to the project, it is difficult to say more — it would just be guesswork.