You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ This serves two purposes:
19
19
-**Breaking:** The internals of the navigation system has been rewritten into a new Navigation API. This change is breaking for custom navigation implementations. For more information, see below.
20
20
-**Breaking:** The `hyde.features` configuration format has changed to use Enums instead of static method calls. For more information, see below.
21
21
-**Breaking:** Renamed class `DataCollections` to `DataCollection`. For more information, see below.
22
+
-**Breaking:** The `hyde.authors` config setting should now be keyed by the usernames. For more information, see below.
22
23
- Medium: The `route` function will now throw a `RouteNotFoundException` if the route does not exist in https://github.com/hydephp/develop/pull/1741
23
24
- Minor: Navigation menu items are now no longer filtered by duplicates (meaning two items with the same label can now exist in the same menu) in https://github.com/hydephp/develop/pull/1573
24
25
- Minor: Due to changes in the navigation system, it is possible that existing configuration files will need to be adjusted in order for menus to look the same (in terms of ordering etc.)
@@ -29,6 +30,7 @@ This serves two purposes:
29
30
- Minor: `Includes::path()` and `Includes::get()` methods now normalizes paths to be basenames to match the behaviour of the other include methods in https://github.com/hydephp/develop/pull/1738. This means that nested directories are no longer supported, as you should use a data collection for that.
30
31
- Minor: The `processing_time_ms` attribute in the `sitemap.xml` file has now been removed in https://github.com/hydephp/develop/pull/1744
31
32
- Minor: Updated the `Hyde::url()` helper to return `null` instead of throwing a `BaseUrlNotSetException` when no site URL is set and no path was provided to the method in https://github.com/hydephp/develop/pull/1760
33
+
- Overhauled the blog post author feature in https://github.com/hydephp/develop/pull/1782
32
34
- Improved the sitemap data generation to be smarter and more dynamic in https://github.com/hydephp/develop/pull/1744
33
35
- Skipped build tasks will now exit with an exit code of 3 instead of 0 in https://github.com/hydephp/develop/pull/1749
34
36
- The `hasFeature` method on the Hyde facade and HydeKernel now only accepts a Feature enum value instead of a string for its parameter.
@@ -47,6 +49,7 @@ This serves two purposes:
47
49
- Breaking: Removed the deprecated `\Hyde\Framework\Services\BuildService::transferMediaAssets()` method (see upgrade guide below)
48
50
- Removed the deprecated global`unslash()` function, replaced with the namespaced `\Hyde\unslash()` function in https://github.com/hydephp/develop/pull/1754
49
51
- Removed the deprecated `BaseUrlNotSetException` class, with the `Hyde::url()` helper now returning `null` if no base URL is set in https://github.com/hydephp/develop/pull/1760
52
+
- Removed: The deprecated `PostAuthor::getName()` method is now removed (use `$author->name`) in https://github.com/hydephp/develop/pull/1782
50
53
- Internal: Removed the internal `DocumentationSearchPage::generate()` method as it was unused in https://github.com/hydephp/develop/pull/1569
51
54
52
55
### Fixed
@@ -146,6 +149,23 @@ Of course, if you have disabled any of the features, do not include them in the
146
149
147
150
## General impact
148
151
152
+
### Post Author changes
153
+
154
+
This release makes major improvements into the usability and design of the blog post author feature.
155
+
156
+
Here is the full list of changes:
157
+
158
+
- Breaking: The `hyde.authors` config setting should now be keyed by the usernames
159
+
- Removed: The deprecated `PostAuthor::getName()` method is now removed (use `$author->name`)
160
+
- Feature: We now support setting authors in the YAML configuration! Fixes `#1719`
161
+
- Feature: Added a `$author->getPosts()` method to get all author's posts
162
+
- Feature: Authors now can also have custom biographies and social media links
163
+
- The PostAuthor class is now Arrayable and JsonSerializable
164
+
- The collection of site authors are now stored in the HydeKernel
165
+
- Authors can additionally be accessed through `Hyde::authors()`
166
+
167
+
For more information, see https://github.com/hydephp/develop/pull/1782
168
+
149
169
### Documentation search page changes
150
170
151
171
The documentation search page and search index have been changed to be generated as `InMemoryPages` instead of a post-build task.
Copy file name to clipboardExpand all lines: packages/framework/src/Framework/Features/Blogging/Models/PostAuthor.php
+62-20Lines changed: 62 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -4,30 +4,37 @@
4
4
5
5
namespaceHyde\Framework\Features\Blogging\Models;
6
6
7
+
useHyde\Hyde;
7
8
useStringable;
8
9
useHyde\Facades\Author;
9
-
useHyde\Facades\Config;
10
+
useHyde\Pages\MarkdownPost;
10
11
useIlluminate\Support\Collection;
11
-
useJetBrains\PhpStorm\Deprecated;
12
+
useHyde\Support\Concerns\Serializable;
13
+
useHyde\Foundation\Kernel\PageCollection;
14
+
useHyde\Support\Contracts\SerializableContract;
12
15
13
-
usefunctionstrtolower;
14
16
usefunctionis_string;
17
+
usefunctionarray_merge;
18
+
usefunctionarray_filter;
15
19
16
20
/**
17
-
* Object representation of a post author for the site.
21
+
* Object representation of a blog post author for the site.
18
22
*/
19
-
class PostAuthor implements Stringable
23
+
class PostAuthor implements Stringable, SerializableContract
20
24
{
25
+
use Serializable;
26
+
21
27
/**
22
28
* The username of the author.
29
+
*
23
30
* This is the key used to find authors in the config.
24
31
*/
25
32
publicreadonlystring$username;
26
33
27
34
/**
28
35
* The display name of the author.
29
36
*/
30
-
publicreadonlystring$name;
37
+
publicreadonly?string$name;
31
38
32
39
/**
33
40
* The author's website URL.
@@ -37,6 +44,27 @@ class PostAuthor implements Stringable
37
44
*/
38
45
publicreadonly ?string$website;
39
46
47
+
/**
48
+
* The author's biography.
49
+
*/
50
+
publicreadonly ?string$bio;
51
+
52
+
/**
53
+
* The author's avatar image.
54
+
*
55
+
* If you in your Blade view use `Hyde::asset($author->avatar)`, then this value supports using both image names for files in `_media`, or full URIs starting with the protocol.
0 commit comments