Skip to content

Commit

Permalink
Merge pull request #1996 from hydephp/add-environment-variable-suppor…
Browse files Browse the repository at this point in the history
…t-for-saving-previews

[2.x] Add environment variable support for saving previews
  • Loading branch information
caendesilva authored Nov 5, 2024
2 parents a306fb9 + 7a713a4 commit fac15bb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This serves two purposes:
- Introduced a new navigation config builder class to simplify navigation configuration in https://github.com/hydephp/develop/pull/1827
- You can now add custom posts to the blog post feed component when including it directly in https://github.com/hydephp/develop/pull/1893
- Added a `Feature::fromName()` enum helper in https://github.com/hydephp/develop/pull/1895
- Added environment variable support for saving previews in https://github.com/hydephp/develop/pull/1996
- Added support for specifying features in the YAML configuration in https://github.com/hydephp/develop/pull/1896
- **Added a new consolidated Asset API to better handle media files.**
- Added several new fluent methods to the `MediaFile` class, like `getLink()`, `getLength()`, `getMimeType()`, etc.
Expand Down
2 changes: 1 addition & 1 deletion config/hyde.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
'host' => env('SERVER_HOST', 'localhost'),

// Should preview pages be saved to the output directory?
'save_preview' => false,
'save_preview' => env('SERVER_SAVE_PREVIEW', false),

// Should the live edit feature be enabled?
'live_edit' => env('SERVER_LIVE_EDIT', true),
Expand Down
2 changes: 1 addition & 1 deletion docs/extensions/realtime-compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The server can be configured in the `config/hyde.php` file to change the port, h
'server' => [
'port' => env('SERVER_PORT', 8080),
'host' => env('SERVER_HOST', 'localhost'),
'save_preview' => false,
'save_preview' => env('SERVER_SAVE_PREVIEW', false),
],
```

Expand Down
2 changes: 1 addition & 1 deletion packages/framework/config/hyde.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
'host' => env('SERVER_HOST', 'localhost'),

// Should preview pages be saved to the output directory?
'save_preview' => false,
'save_preview' => env('SERVER_SAVE_PREVIEW', false),

// Should the live edit feature be enabled?
'live_edit' => env('SERVER_LIVE_EDIT', true),
Expand Down
1 change: 1 addition & 0 deletions packages/realtime-compiler/tests/RealtimeCompilerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class RealtimeCompilerTest extends UnitTestCase
public static function setUpBeforeClass(): void
{
putenv('SERVER_LIVE_EDIT=false');
putenv('SERVER_SAVE_PREVIEW=true');

define('BASE_PATH', realpath(__DIR__.'/../../../'));

Expand Down

0 comments on commit fac15bb

Please sign in to comment.