Skip to content

Commit 828e692

Browse files
authored
Merge pull request #1245 from hydephp/deprecate-canonical-url-property
Deprecate HydePage canonical url property
2 parents 7a7cd94 + 440a049 commit 828e692

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This serves two purposes:
1616
- for changes in existing functionality.
1717

1818
### Deprecated
19-
- for soon-to-be removed features.
19+
- HydePage::$canonicalUrl
2020

2121
### Removed
2222
- for now removed features.

packages/framework/src/Markdown/Contracts/FrontMatter/PageSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface PageSchema extends FrontMatterSchema
1313
{
1414
public const PAGE_SCHEMA = [
1515
'title' => 'string',
16-
'canonicalUrl' => 'string',
16+
'canonicalUrl' => 'string', // DEPRECATED
1717
'navigation' => NavigationSchema::NAVIGATION_SCHEMA,
1818
];
1919
}

packages/framework/src/Pages/Concerns/HydePage.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ abstract class HydePage implements PageSchema, SerializableContract
6767
public NavigationData $navigation;
6868

6969
public string $title;
70+
71+
/** @deprecated v1.0.0-RC.3 - This property requires information that is setup-dependent, and will work better through a runtime accessor. Since it is mainly related to blog posts, it will be moved there. */
7072
public ?string $canonicalUrl;
7173

7274
public static function make(string $identifier = '', FrontMatter|array $matter = []): static

0 commit comments

Comments
 (0)