The provided page types as documented here https://sandbox.irishtimes.arcpublishing.com/alc/arc-products/themes/user-docs/page-template-guide/page-types/ do not account for standalone pages. i.e pages that are not sections which will have articles circulated to them, not author pages, not tag pages etc. Without assigning any page type, the canonical URL is not set. Assigning them a page type, like article or tag, incorrectly sets the canonical to be the homepage.
This causes issues in social share previews, Chartbeat counting since it relies on the canonical, and has had a knock on effect in our apps too.
We will need to write some custom code in the outputType to be able to set a canonical for this scenario, but ideally this should be provided as part of the product. A page-type which can be chosen for these types of standalone pages which the Engine SDK Metadata block understands and can set the canonical and any other meta data tags accordingly.
https://github.com/WPMedia/engine-theme-sdk/blob/canary/src/components/MetaData/index.tsx
Has anything been done on this yet? Is it something that could be coming with Themes 2? Is it possible to add custom page types and if so what are the implications of doing so?
Hi Elinor, thank you for the idea and sharing your use case. This makes a sense, and we will be implementing some better "out-of-the-box" SEO/Schema.org metadata improvements on the Themes roadmap in 2023.