Skip to content
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

[2.x] Add environment variable support for saving previews #1996

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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