Skip to content

Commit e2cdca6

Browse files
committed
Update RELEASE_NOTES.md
1 parent a313579 commit e2cdca6

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

RELEASE_NOTES.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,78 @@ For example, an empty or malformed JSON file will now throw an exception like th
340340

341341
In order to normalize the thrown exceptions, we now rethrow the `ParseException` from `Symfony/Yaml` as our custom `ParseException` to match the JSON and Markdown validation.
342342
Additionally, an exception will be thrown if a data file is empty, as this is unlikely to be intentional. Markdown files can have an empty body if front matter is present.
343+
344+
## New features
345+
346+
<!-- Editors note: Todo: Maybe move to the relevant docs... -->
347+
348+
### Navigation configuration changes
349+
350+
The custom navigation item configuration format has been updated to use array inputs. This change allows for more flexibility and consistency in defining navigation items.
351+
352+
#### Old format:
353+
354+
```php
355+
'navigation' => [
356+
'custom_items' => [
357+
'Custom Item' => '/custom-page',
358+
],
359+
],
360+
```
361+
362+
#### New format:
363+
364+
```php
365+
'navigation' => [
366+
'custom_items' => [
367+
['label' => 'Custom Item', 'destination' => '/custom-page'],
368+
],
369+
],
370+
```
371+
372+
Additionally, the `hyde.navigation.subdirectories` configuration option has been renamed to `hyde.navigation.subdirectory_display`. Update your configuration files accordingly.
373+
374+
### YAML configuration for navigation items
375+
376+
You can now set custom navigation items directly in your YAML configuration files. This provides an alternative to defining them in the PHP configuration files.
377+
378+
Example:
379+
380+
```yaml
381+
navigation:
382+
custom_items:
383+
- label: Custom Item
384+
destination: /custom-page
385+
```
386+
387+
### Extra attributes for navigation items
388+
389+
Navigation items now support extra attributes, allowing you to add custom data or styling to your navigation elements. You can set these attributes in both PHP and YAML configurations.
390+
391+
Example in PHP:
392+
393+
```php
394+
'navigation' => [
395+
'custom_items' => [
396+
[
397+
'label' => 'Custom Item',
398+
'destination' => '/custom-page',
399+
'attributes' => ['class' => 'special-link', 'target' => '_blank'],
400+
],
401+
],
402+
],
403+
```
404+
405+
Example in YAML:
406+
407+
```yaml
408+
navigation:
409+
custom_items:
410+
- label: Custom Item
411+
destination: /custom-page
412+
attributes:
413+
class: special-link
414+
target: _blank
415+
```
416+
417+
These changes provide more flexibility and control over your site's navigation structure. Make sure to update your configuration files and any custom code that interacts with navigation items to align with these new formats and features.

0 commit comments

Comments
 (0)