From fdebbe624c1356505bc575f234d3421b5ac4ea68 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 7 Feb 2024 16:55:53 +0100 Subject: [PATCH 1/4] Add media extensions option to default config --- packages/framework/config/hyde.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/framework/config/hyde.php b/packages/framework/config/hyde.php index b05f8683950..457476fc321 100644 --- a/packages/framework/config/hyde.php +++ b/packages/framework/config/hyde.php @@ -446,6 +446,11 @@ | */ + // Change the file extensions to be considered as media files. + // If you want to add more extensions, use the merge array. + // If you want to replace them, override the entire array. + 'media_extensions' => array_merge([], \Hyde\Support\Filesystem\MediaFile::EXTENSIONS), + // The list of directories that are considered to be safe to empty upon site build. // If the site output directory is set to a directory that is not in this list, // the build command will prompt for confirmation before emptying it. From 1d9b625d9bfbbfdc183544bbb1686845bfaffbf5 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 7 Feb 2024 18:09:15 +0100 Subject: [PATCH 2/4] Reformat code comment to be more concise --- packages/framework/config/hyde.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/framework/config/hyde.php b/packages/framework/config/hyde.php index 457476fc321..c65a8375a6e 100644 --- a/packages/framework/config/hyde.php +++ b/packages/framework/config/hyde.php @@ -446,9 +446,8 @@ | */ - // Change the file extensions to be considered as media files. - // If you want to add more extensions, use the merge array. - // If you want to replace them, override the entire array. + // Change the file extensions to be considered as media files and are copied to the output directory. + // If you want to add more extensions, add it to the empty merge array, or just override the entire array. 'media_extensions' => array_merge([], \Hyde\Support\Filesystem\MediaFile::EXTENSIONS), // The list of directories that are considered to be safe to empty upon site build. From e34ebaffe26c326a1c9d5b1f9d4fa35f8ad56141 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 7 Feb 2024 18:09:40 +0100 Subject: [PATCH 3/4] Normalize config files --- config/hyde.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/hyde.php b/config/hyde.php index b05f8683950..c65a8375a6e 100644 --- a/config/hyde.php +++ b/config/hyde.php @@ -446,6 +446,10 @@ | */ + // Change the file extensions to be considered as media files and are copied to the output directory. + // If you want to add more extensions, add it to the empty merge array, or just override the entire array. + 'media_extensions' => array_merge([], \Hyde\Support\Filesystem\MediaFile::EXTENSIONS), + // The list of directories that are considered to be safe to empty upon site build. // If the site output directory is set to a directory that is not in this list, // the build command will prompt for confirmation before emptying it. From cab772a687326a8dcd69e9eed556723da9e8724c Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 7 Feb 2024 18:13:07 +0100 Subject: [PATCH 4/4] Update RELEASE_NOTES.md --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 62e8cc9bf86..2ea1dadff8b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -20,7 +20,7 @@ This serves two purposes: 2. At release time, you can move the Unreleased section changes into a new release version section. ### Added -- for new features. +- Added the existing `media_extensions` option to the `hyde` configuration file in https://github.com/hydephp/develop/pull/1531 ### Changed - Renamed local template variable `$document` to `$article` to better match the usage in https://github.com/hydephp/develop/pull/1506