-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration options to add HTML to the head and scripts sections #1542
Conversation
Since these may contain overrides we want them last
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1542 +/- ##
=============================================
Coverage 100.00% 100.00%
- Complexity 1740 3480 +1740
=============================================
Files 180 360 +180
Lines 4715 9430 +4715
=============================================
+ Hits 4715 9430 +4715 ☔ View full report in Codecov by Sentry. |
882bafc may be implemented in a separate PR to keep this scope smaller. Clearing it from the branch now. |
27d7d6b
to
587ce5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add test to make sure this works on documentation pages. Edit: Tested to confirm
Add Head and Script HTML Hooks
This pull request adds support for the new configuration options
head
andscripts
infor HydePHP v1.5.In order to provide users with a more flexible way to add custom HTML to their site's
<head>
or just before the closing</body>
tag, this pull request introduces new configuration options in theconfig/hyde.php
file and thehyde.yml
file.Changes Made:
head
configuration option to thehyde.php
file and thehyde.yml
filescripts
configuration option to thehyde.php
file and thehyde.yml
fileUsage:
To add custom HTML to your layouts, you can now utilize the
head
andscripts
configuration options in theconfig/hyde.php
file or thehyde.yml
file.Example of adding custom HTML in
config/hyde.php
:Example of adding custom HTML in
hyde.yml
:Additionally, you can add multiple lines of HTML:
Example of adding multiple lines of HTML in
config/hyde.php
:Example of adding multiple lines of HTML in
hyde.yml
:Please note that the custom HTML added using these options will be applied to all pages. If you need to add HTML to a specific page, you will need to override the layout for that page.
Feel free to review and provide any feedback or suggestions for improvement. Thank you!
Technical Details
config/hyde.php
,hyde.yml
head
,scripts