Skip to content

HydePHP Version v1.5 Released

Posted by author in the category "releases"

Overview

HydePHP v1.5 is now available for download!

In this release, several new features and improvements have been introduced.

Improved Patch Release Strategy

This release experiments some changes into how releases are handled to clarify the patch versioning of distributed packages compared to the monorepo source versioning.

In short: We are now experimenting with rolling patch releases, where patches are released as soon as they're ready, leading to faster rollout of bugfixes. This means that the patch version discrepancy between the monorepo and the distributed packages will be increased, but hopefully the end results will still be clearer, thanks to the second related change: Prefixing the subpackage changes in this changelog with the package name. If there is no prefix, the change applies to the core package or the monorepo.

All this to say, please keep in mind that when the monorepo gets a new minor version, the prefixed changes may already have been released as patches in their respective packages.

Added

Easier media extensions configuration

We made it easier to change the file extensions Hyde uses to find media files to copy the output directory. We did this by adding the existing media_extensions option to the hyde configuration. If you want to add more extensions, simply add them to the empty merge array, or just override the entire array.

Filepath: config/hyde.php
1'media_extensions' => array_merge([
2 // Add custom media file extensions here
3], \Hyde\Support\Filesystem\MediaFile::EXTENSIONS),

New Includes facade helper for HTML

We added a new html helper to the Includes facade to make it easier to include HTML files.

This gets the raw HTML of a partial file in the includes directory. Supplying the file extension is optional.

1<!-- filepath resources/includes/footer.html -->
2<!-- Custom HTML in the footer -->
1use Hyde\Support\Includes;
2 
3Includes::html('footer');
4Includes::html('footer.html');
5 
6// With default value if the file does not exist
7Includes::html('footer', 'Default content');

Custom HTML in the <head> and <script> sections

We also added configuration options to add custom HTML to the <head> and <script> sections.

Filepath: config/hyde.php
1'head' => '<!-- Custom HTML in the head -->',
2'scripts' => '<!-- Custom HTML in the body -->',

Or if you are using Yaml configuration:

Filepath: config/hyde.yml
1head: "<!-- Custom HTML in the head -->"
2scripts: "<!-- Custom HTML in the body -->"

Custom <head> and <script> sections using HTML includes

You can now also add custom HTML to the <head> and <script> sections using HTML includes.

Filepath: resources/includes/head.html
1<!-- Custom HTML in the head -->
Filepath: resources/includes/scripts.html
1<!-- Custom HTML in the body -->

Changed

Deprecated

We deprecated the BuildService::transferMediaAssets() method, as it will be moved into a build task in v2.0. See #1533.

Bug Fixes

Here are just some of the bug fixes in this release:

  • Updated the Markdown to plain text converter to trim whitespace in #1561
  • Realtime Compiler: Fixed icons not being considered as images by dashboard viewer in #1512
  • Realtime Compiler: Fixed visual dashboard bugs in #1528
  • HydeFront: Fixed bug where heading permalink buttons were included in text represented output in #1519
  • HydeFront: Fix visual overflow bug in inline code blocks within blockquotes in #1525

Upgrade Guide

To upgrade to this version, simply run the following commands:

1composer require hyde/framework:^1.5
2composer require hyde/realtime-compiler:^3.3

You may first want to read the upgrade guide documentation.

Conclusion

We hope you enjoy this release, and please report any issues you find at GitHub, https://github.com/hydephp/hyde, and share your thoughts on Twitter/X, just use the hashtag #HydePHP, and tag us at @HydeFramework.


Syntax highlighting by Torchlight.dev

End of article