Skip to content

Conversation

@fetii1
Copy link
Contributor

@fetii1 fetii1 commented Aug 28, 2025

closes #46

Overview

This PR updates the LuckySeo.php Tag to ensure the canonical URL is generated correctly. Instead of returning relative paths, it now outputs the full absolute canonical URL, improving SEO consistency and ensuring external crawlers interpret the correct domain.

UPDATE:

  • Also a small fix for tw-description and custom-tw-description
  • Fixed Append/Prepend to be visible if both available.

For Reviewers:

install a fresh statamic project with the starter kit

statamic new statamic-starter lucky-media/statamic-starter

copy-paste the LuckySeo.php code from this branch.

Open or Create a new Page (e.g., Home, About) and verify the canonical URL:

  • When seo_canonical is an Entry → should return absolute URL for that Entry.
  • When seo_canonical is a string → should return the string (e.g https://www.testing.com/).
  • When empty → should fallback to the page’s permalink.

@fetii1 fetii1 requested review from afan417 and lokmanm August 28, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pages Canonical SEO do not work with Entry Picker

2 participants