Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
99f5862
Create new-publish-command-spec.md
emmadesilva Jul 4, 2026
83d38f5
Create new-publish-command-implementation-plan.md
emmadesilva Jul 4, 2026
a3961d9
Update new-publish-command-spec.md
emmadesilva Jul 4, 2026
4e8c1bb
Step 1: Add OverwritePolicy service and OverwriteAction enum
emmadesilva Jul 4, 2026
1da3b15
Step 2: Add publishable page registry
emmadesilva Jul 4, 2026
30ad042
Step 2: Remove blank starter default target
emmadesilva Jul 4, 2026
2653a35
Step 3: Add PublishCommand guardrails
emmadesilva Jul 4, 2026
bcbc0d5
Step 4: Implement the views publishing flow
emmadesilva Jul 4, 2026
72eb125
Step 5: Implement the pages publishing flow
emmadesilva Jul 4, 2026
95bcd5d
Step 5: Streamline page destination prompt
emmadesilva Jul 4, 2026
bf3ab26
Step 5: Pin multi-select --to guard precedence
emmadesilva Jul 4, 2026
ab376c3
Step 6: Register the hyde-config publish tag
emmadesilva Jul 4, 2026
67cab3e
Step 7: Convert the old publish commands into deprecated aliases
emmadesilva Jul 4, 2026
cee3670
Step 8: Align docs with the new publish command surface
emmadesilva Jul 4, 2026
7e10538
Step 9: Acceptance sweep — pin --all-is-views-only (§11)
emmadesilva Jul 4, 2026
57a56f5
Apply fixes from StyleCI
StyleCIBot Jul 4, 2026
eff6786
Fix publish views invalid group handling
emmadesilva Jul 4, 2026
952c83b
Cover remaining publish feature paths in tests
emmadesilva Jul 4, 2026
2222aa0
Step A: Remove the three legacy publish commands
emmadesilva Jul 4, 2026
785dbcb
Step B: Dead-code sweep after removing legacy publish commands
emmadesilva Jul 4, 2026
b40186d
Step C: Config tags — hyde-config is the only tag in v3
emmadesilva Jul 4, 2026
e9be2b9
Step D: Documentation — the upgrade guide carries the break
emmadesilva Jul 4, 2026
45aa772
Step E: Sync spec with reality and repair mangled docblocks
emmadesilva Jul 4, 2026
af392e0
Step F: Acceptance sweep — purge live references to removed commands
emmadesilva Jul 4, 2026
c0ba9ee
Fix view publish base directory prefix
emmadesilva Jul 4, 2026
b2001e0
Add publish empty selection coverage
emmadesilva Jul 4, 2026
a96cad6
Simplify publish conflict label formatting
emmadesilva Jul 4, 2026
9a90264
Preserve multiselect option keys
emmadesilva Jul 4, 2026
f726501
Fail cleanly for missing publish sources
emmadesilva Jul 4, 2026
6aeae6c
Keep custom page target prompt active
emmadesilva Jul 4, 2026
b41fef0
Handle publish copy failures
emmadesilva Jul 4, 2026
c0eb5a7
Recheck publish targets before copying
emmadesilva Jul 4, 2026
ad08089
Normalize publish page targets
emmadesilva Jul 4, 2026
46e72e7
Fix publish wizard page route test fixture
emmadesilva Jul 4, 2026
c1d3555
Apply fixes from StyleCI
StyleCIBot Jul 4, 2026
dd0979d
Remove unnecessary code comments
emmadesilva Jul 4, 2026
1134d08
Restore useful code comments
emmadesilva Jul 4, 2026
70332f2
Revert "Restore useful code comments"
emmadesilva Jul 4, 2026
8a16ede
Revert "Remove unnecessary code comments"
emmadesilva Jul 4, 2026
5e97a99
Add publish overwrite guard feature tests
emmadesilva Jul 4, 2026
d855f7a
Remove unnecessary comments
emmadesilva Jul 5, 2026
4108bae
Refactor publish conflict resolution
emmadesilva Jul 5, 2026
12b883a
Remove publish checksum revalidation
emmadesilva Jul 5, 2026
83cddf3
Update documented example
emmadesilva Jul 5, 2026
ee36811
Fix fragile command parsing
emmadesilva Jul 5, 2026
bea60fb
Fix page publish target normalization
emmadesilva Jul 5, 2026
4ecc67e
Decouple publisher console interactions
emmadesilva Jul 5, 2026
0a3d248
Handle publish overwrite policy errors gracefully
emmadesilva Jul 5, 2026
fd2011b
Fix publish option presence check
emmadesilva Jul 5, 2026
694ffbe
Remove legacy publish alias plan
emmadesilva Jul 5, 2026
5de5e76
Cleanup the code
emmadesilva Jul 5, 2026
4461719
Add missing test
emmadesilva Jul 6, 2026
7fdf2c0
Test nested page publishing
emmadesilva Jul 6, 2026
8c4f65e
Test generic publish policy error
emmadesilva Jul 6, 2026
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
20 changes: 20 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,31 @@ StaticPageBuilder::handle(Pages::getPage('_posts/hello-world.md'));

Note that this only produces a correct `_site` when the page is self-contained. For anything that touches aggregate outputs, run `php hyde build` to rebuild the whole site instead.

## Step 3: Replace the Removed Publishing Commands

The three legacy publishing commands (`publish:views`, `publish:configs`, and `publish:homepage`) were removed in v3 and replaced by the unified `publish` command (and, for configuration files, the standard `vendor:publish` path). They are not aliased — invoking one now raises the native "command not found" error, which already suggests `publish` as an alternative.

| Removed in v3 | Use instead |
|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
| `publish:views` | `php hyde publish --all` (or `--layouts` / `--components`, or bare `publish` for the interactive picker) |
| `publish:views layouts` | `php hyde publish --layouts` |
| `publish:views components` | `php hyde publish --components` |
| `publish:configs` | `php hyde vendor:publish --tag=hyde-config --force` |
| `publish:homepage` | `php hyde publish --page` |
| `publish:homepage welcome` | `php hyde publish --page=welcome` |
| `publish:homepage posts` | `php hyde publish --page=posts --to=_pages/index.blade.php` (the old command always published to the index; the new default is `_pages/posts.blade.php`) |
| `publish:homepage blank` | `php hyde publish --page=blank --to=_pages/index.blade.php` (blank now has no default destination) |

The config publish tags were consolidated too: `hyde-configs`, `support-configs`, and `configs` are removed, and `hyde-config` is now the only Hyde config publish tag.

Note that the new `publish` command never overwrites files you have modified without confirmation or `--force`, where the old commands overwrote silently. This is why the `publish:configs` replacement passes `--force` — existing files are skipped without it.

## Migration Checklist

Use this checklist to track your upgrade progress:

- [ ] Replaced any `php hyde rebuild <path>` usage with `StaticPageBuilder::handle()` or a full `php hyde build`
- [ ] Replaced any `publish:views`, `publish:configs`, or `publish:homepage` usage with the new `publish` / `vendor:publish` commands (see the table above; note the `posts`/`blank` `--to` mappings)

## Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion _pages/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class="relative mt-2 text-transparent bg-clip-text bg-linear-to-br logo-gradient
This is the default homepage stored as index.blade.php, however you can publish any of the built-in views using the following command:

<!-- Syntax highlighted by torchlight.dev -->
<pre style="margin-top: 1.5rem; margin-bottom: 1.5rem;"><code data-theme="material-theme-palenight" data-lang="bash" class="torchlight" style="background-color: #292D3E; padding: 0.5rem 1rem; border-radius: 0.25rem;"><span style="color: #FFCB6B;">php hyde</span> <span style="color: #C3E88D;">publish:homepage</span></code></pre>
<pre style="margin-top: 1.5rem; margin-bottom: 1.5rem;"><code data-theme="material-theme-palenight" data-lang="bash" class="torchlight" style="background-color: #292D3E; padding: 0.5rem 1rem; border-radius: 0.25rem;"><span style="color: #FFCB6B;">php hyde</span> <span style="color: #C3E88D;">publish --page</span></code></pre>
</p>
</section>

Expand Down
2 changes: 1 addition & 1 deletion docs/creating-content/managing-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ To make it really easy to customize asset loading, the styles and scripts are lo
To customize them, run the following command:

```bash
php hyde publish:views layouts
php hyde publish --layouts
```

Then edit the files found in `resources/views/vendor/hyde/layouts` directory of your project.
Expand Down
4 changes: 2 additions & 2 deletions docs/digging-deeper/advanced-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ coloured blockquotes. Simply append the desired colour after the initial `>` cha
You can easily customize these styles by publishing and editing the `markdown-blockquote.blade.php` file.

```bash
php hyde publish:views components
php hyde publish --components
```

### Markdown usage
Expand Down Expand Up @@ -166,7 +166,7 @@ You can enable it for other page types by adding the page class to the `permalin
Under the hood, Hyde uses a custom Blade-based heading renderer when converting Markdown to HTML. This allows for more flexibility and customization compared to standard Markdown parsers. You can also publish and customize the Blade component used to render the headings:

```bash
php hyde publish:components
php hyde publish --components
```

This will copy the `markdown-heading.blade.php` component to your views directory where you can modify its markup and behavior.
Expand Down
11 changes: 7 additions & 4 deletions docs/digging-deeper/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The main configuration file, `hyde.php`, is used for things ranging from site na

Since HydePHP is based on Laravel we also have a few configuration files related to them. As you most often don't need
to edit any of these, unless you want to make changes to the underlying application, they are not present in the
base HydePHP installation. However, you can publish them to your project by running `php hyde publish:configs`.
base HydePHP installation. However, you can publish them to your project by running `php hyde vendor:publish --tag=hyde-config`.

| Config File | Description |
|------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|
Expand All @@ -92,7 +92,7 @@ base HydePHP installation. However, you can publish them to your project by runn

{.align-top}

If any of these files are missing, you can run `php hyde publish:configs` to copy the default files to your project.
If any of these files are missing, you can run `php hyde vendor:publish --tag=hyde-config` to copy the default files to your project.

## Configuration Options

Expand Down Expand Up @@ -371,12 +371,15 @@ instead the appropriate color scheme will be automatically applied based on the
Hyde uses the Laravel Blade templating engine. Most parts of the included templates have been extracted into components to be customized easily.
Before editing the views you should familiarize yourself with the [Laravel Blade Documentation](https://laravel.com/docs/10.x/blade).

To edit a default Hyde component you need to publish them first using the `hyde publish:views` command.
To edit a default Hyde component you need to publish them first using the `hyde publish` command.

```bash
php hyde publish:views
php hyde publish --all
```

You can also run `php hyde publish` without any flags to interactively pick which views to publish,
or scope the command to just `--layouts` or `--components`.

The files will then be available in the `resources/views/vendor/hyde` directory.

>info **Tip:** If you use Linux/macOS or Windows with WSL you will be able to interactively select individual files to publish.
Expand Down
4 changes: 2 additions & 2 deletions docs/digging-deeper/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ HydePHP comes with a started homepage called 'posts'. This includes a component

#### Creating our posts page

Now, let's paginate this feed! For this example, we will assume that you ran `php hyde publish:homepage posts`
and renamed the resulting `index.blade.php` file to `posts.blade.php`. We will also assume that you have a few blog posts set up.
Now, let's paginate this feed! For this example, we will assume that you ran `php hyde publish --page=posts`
to publish the posts feed page to `_pages/posts.blade.php`. We will also assume that you have a few blog posts set up.

The blog post feed component is a simple component that looks like this:

Expand Down
4 changes: 2 additions & 2 deletions docs/digging-deeper/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ You can read more about some of these in the [Core Concepts](core-concepts#paths
| Wrong layout used | Hyde determines the layout template to use depending on the directory of the source file | Ensure your source file is in the right directory. |
| Invalid/no permalinks or post URIs | You may be missing or have an invalid site URL | Set the site URL in the `.env` file |
| No styles in custom Blade pages | When using custom blade pages need to add the styles yourself. You can do this by extending the default layout | Use the app layout, or by include the Blade components directly. |
| Overriding Hyde views is not working | Ensure the Blade views are in the correct directory. | Rerun `php hyde publish:views`. |
| Overriding Hyde views is not working | Ensure the Blade views are in the correct directory. | Rerun `php hyde publish --all`. |
| Styles not updating when deploying site | It could be a caching issue. To be honest, when dealing with styles, it's always a caching issue. | Clear your cache, and optionally complain to your site host |
| Documentation sidebar items are in the wrong order | Double check the config, make sure the route keys are written correctly. Check that you are not overriding with front matter. | Check config for typos and front matter |
| Issues with date in blog post front matter | The date is parsed by the PHP `strtotime()` function. The date may be in an invalid format, or the front matter is invalid | Ensure the date is in a format that `strtotime()` can parse. Wrap the front matter value in quotes. |
| RSS feed not being generated | The RSS feed requires that you have set a site URL in the Hyde config or the `.env` file. Also check that you have blog posts, and that they are enabled. | Check your configuration files. | |
| Sitemap not being generated | The sitemap requires that you have set a site URL in the Hyde config or the `.env` file. | Check your configuration files. | |
| Unable to do literally anything | If everything is broken, you may be missing a Composer package or your configuration files could be messed up. | Run `composer install` and/or `composer update`. If you can run HydeCLI commands, update your configs with `php hyde publish:configs`, or copy them manually from GitHub or the vendor directory. |
| Unable to do literally anything | If everything is broken, you may be missing a Composer package or your configuration files could be messed up. | Run `composer install` and/or `composer update`. If you can run HydeCLI commands, update your configs with `php hyde vendor:publish --tag=hyde-config --force` (existing files are skipped without `--force`), or copy them manually from GitHub or the vendor directory. |
| Namespaced Yaml config (`hyde.yml`) not working | When using namespaced Yaml configuration, you must begin the file with `hyde:`, even if you just want to use another file for example `docs:`. | Make sure the file starts with `hyde:` (You don't need to specify any options, as long as it's present). See [`#1475`](https://github.com/hydephp/develop/issues/1475) |

### Extra troubleshooting information
Expand Down
8 changes: 5 additions & 3 deletions docs/digging-deeper/updating-hyde.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,16 @@ composer update
Then, update your config files. This is the hardest part, as you may need to manually copy in your own changes.

```bash
php hyde publish:configs
php hyde vendor:publish --tag=hyde-config --force
```

Note that existing files are skipped without `--force`, so it is required here to overwrite your current config files.

If you have published any of the included Blade components you will need to re-publish them.

```bash
php hyde publish:views layouts
php hyde publish:views components
php hyde publish --layouts
php hyde publish --components
```

You may also want to download any resources that have been updated. You download these from the Zip file of the latest release on GitHub.
Expand Down
Loading