Skip to content

Commit

Permalink
Merge branch 'master' into 2.x-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Feb 13, 2024
2 parents 2cea704 + 53d6aea commit d764907
Showing 209 changed files with 2,500 additions and 1,369 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -457,11 +457,34 @@ jobs:
- name: Create README.md
run: echo '# CI/CD generated reports for [${{ github.sha }}](https://github.com/hydephp/develop/commit/${{ github.sha }})' > master/README.md

# Generate directory listing

- name: Download directory listing generator script
run: wget https://raw.githubusercontent.com/caendesilva/php-directory-listing/a741e74af1a3e5b8d8b730a437c1666945fbedab/directory-listing.php -O .build.php

- name: Check download integrity
run: |
hash=$(sha256sum .build.php | awk '{print $1}')
if [ $hash = "af021b1bef61e31f426dcbc80540aa192e5a7cecf0db4f6b946851ab3101627d" ] ; then echo "Checksum $hash matches"; else echo "Checksum $hash not matching!" && exit 1 ; fi
- name: Set path labels
run: |
echo "hydephp/develop" > .dl-pathlabel
echo "hydephp/develop/master" > master/.dl-pathlabel
- name: Compile static root directory listing
run: php .build.php

- name: Compile static master directory listing
run: cp .build.php master/.build.php && cd master && php .build.php

# End directory listing

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
pull: 'origin gh-pages'
add: 'master'
add: '["master", "index.html"]'
message: 'Upload live reports from test suite run ${{ github.sha }}'


5 changes: 4 additions & 1 deletion .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -17,6 +17,41 @@ HydePHP consists of two primary components, Hyde/Hyde and Hyde/Framework. Develo

<!-- CHANGELOG_START -->

## [1.5.0](https://github.com/hydephp/develop/releases/tag/1.5.0) - 2024-02-13

### Improved Patch Release Strategy

This release experiments some changes into how releases are handled to clarify the patch versioning of distributed packages compared to the monorepo source versioning.

In short: We are now experimenting with rolling patch releases, where patches are released as soon as they're ready, leading to faster rollout of bugfixes.
This means that the patch version discrepancy between the monorepo and the distributed packages will be increased, but hopefully the end results will still be clearer,
thanks to the second related change: Prefixing the subpackage changes in this changelog with the package name. If there is no prefix, the change applies to the core package or the monorepo.

All this to say, please keep in mind that when the monorepo gets a new minor version, the prefixed changes may already have been released as patches in their respective packages.
### Added
- Added the existing `media_extensions` option to the `hyde` configuration file in https://github.com/hydephp/develop/pull/1531
- Added configuration options to add custom HTML to the `<head>` and `<script>` sections in https://github.com/hydephp/develop/pull/1542
- Added support for adding custom HTML to the `<head>` and `<script>` sections using HTML includes in https://github.com/hydephp/develop/pull/1554
- Added an `html` helper to the `Includes` facade in https://github.com/hydephp/develop/pull/1552

### Changed
- Renamed local template variable `$document` to `$article` to better match the usage in https://github.com/hydephp/develop/pull/1506
- Updated semantic documentation article component to support existing variables in https://github.com/hydephp/develop/pull/1506
- Updated the Markdown to plain text converter to trim whitespace in https://github.com/hydephp/develop/pull/1561
- HydeFront: Changed `<code>` styling to display as inline instead of inline-block in https://github.com/hydephp/develop/pull/1525
- Realtime Compiler: Add strict type declarations in https://github.com/hydephp/develop/pull/1555
- Bumped Realtime Compiler version to v3.3 in https://github.com/hydephp/develop/pull/1562
- Internal: Renamed snake case test methods to camel case in https://github.com/hydephp/develop/pull/1556

### Deprecated
- Deprecated the `BuildService::transferMediaAssets()` method in https://github.com/hydephp/develop/pull/1533, as it will be moved into a build task in v2.0.
### Fixed
- Fixed icons not being considered as images by dashboard viewer in https://github.com/hydephp/develop/pull/1512
- HydeFront: Fixed bug where heading permalink buttons were included in text represented output in https://github.com/hydephp/develop/pull/1519
- HydeFront: Fix visual overflow bug in inline code blocks within blockquotes https://github.com/hydephp/hydefront/issues/65 in https://github.com/hydephp/develop/pull/1525
- Realtime Compiler: Fixes visual dashboard bugs https://github.com/hydephp/realtime-compiler/issues/23 and https://github.com/hydephp/realtime-compiler/issues/24 in https://github.com/hydephp/develop/pull/1528


## [1.4.2](https://github.com/hydephp/develop/releases/tag/1.4.2) - 2023-12-22
### Added
- Added info banners when dashboard content sections are empty in https://github.com/hydephp/develop/pull/1494
2 changes: 1 addition & 1 deletion _media/app.css

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion config/hyde.php
Original file line number Diff line number Diff line change
@@ -224,6 +224,23 @@
Meta::property('site_name', env('SITE_NAME', 'HydePHP')),
],

/*
|--------------------------------------------------------------------------
| Custom head and script HTML hooks
|--------------------------------------------------------------------------
|
| While the best way to add custom `<head>` and `<body>` code is to use the
| Blade components, you can also add them here. This is useful for adding
| scripts like analytics codes, chat widgets, or even custom styles.
|
*/

// Add any extra HTML to include in the <head> tag
'head' => '',

// Add any extra HTML to include before the closing <body> tag
'scripts' => '',

/*
|--------------------------------------------------------------------------
| Features
@@ -462,7 +479,7 @@
'build_manifest_path' => 'app/storage/framework/cache/build-manifest.json',

// Here you can specify HydeFront version and URL for when loading app.css from the CDN.
// Only change these if you know what you're doing as some versions may incompatible with your Hyde version.
// Only change these if you know what you're doing as some versions may be incompatible with your Hyde version.
'hydefront_version' => \Hyde\Framework\Services\AssetService::HYDEFRONT_VERSION,
'hydefront_cdn_url' => \Hyde\Framework\Services\AssetService::HYDEFRONT_CDN_URL,

9 changes: 9 additions & 0 deletions docs/_data/partials/hyde-pages-api/hyde-page-methods.md
Original file line number Diff line number Diff line change
@@ -320,6 +320,15 @@ Get the group of the page in the navigation menu, if any.
$page->navigationMenuGroup(): string
```

#### `getCanonicalUrl()`

No description provided.

```php
// torchlight! {"lineNumbers": false}
$page->getCanonicalUrl(): string
```

<!-- End generated docs for Hyde\Pages\Concerns\HydePage -->

</section>
4 changes: 2 additions & 2 deletions docs/advanced-features/build-tasks.md
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ In a way, build tasks are like micro-commands, as they can interact directly wit
In addition, there are some extra helpers available in the base BuildTask class that allow you to fluently format output to the console, which you will see in the examples below.


## Creating build tasks
## Creating Build Tasks

### Minimal example

@@ -103,7 +103,7 @@ Running this task will produce the following output:
As you can see, there is no execution time tracking here, since we overrode the `printFinishMessage()` method that normally prints this. You can of course call the `withExecutionTime()` method to add this back in. See more in the API reference below.


## Registering the tasks
## Registering the Tasks

There are a few ways to register these tasks so Hyde can find them.

2 changes: 1 addition & 1 deletion docs/advanced-features/in-memory-pages.md
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ make sure you register it before the full application is booted so that routes c
_To see how to register the page, see the examples below. But first we must look at how to actually create the page._


## Creating the page
## Creating the Page

To create an InMemoryPage, you need to instantiate it with the required parameters.

2 changes: 1 addition & 1 deletion docs/architecture-concepts/architecture-concepts.md
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ then by all means, please read on! This is also a great place to start if you wa
>info For a high-level overview of these concepts, see the [Basic Architecture Concepts](core-concepts) page.

## Behind the magic
## Behind the Magic

Want to learn more about a particular feature? Click on the links below to visit the article.

2 changes: 1 addition & 1 deletion docs/architecture-concepts/autodiscovery.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ Before reading this article, you should be familiar with the following concepts:
- [The HydeKernel](the-hydekernel)


## Booting pipeline
## Booting Pipeline

The autodiscovery is run when the HydeKernel boots. It does so in three distinct steps, which run in sequence as each
step depends on the previous one. Each discovery step runs in a `FoundationCollection` which both runs the actual
2 changes: 1 addition & 1 deletion docs/architecture-concepts/dynamic-data-discovery.md
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ responsible for data applicable to all page models. Complex structures and data
have their own factories, making the code more modular and maintainable.


## In-depth overview of a page factory
## In-depth Overview of a Page Factory

Let's take a look at how Hyde will discover the title of a page as an example. Since this is something used by all pages,
this discovery is done in the `HydePageDataFactory` class.
4 changes: 2 additions & 2 deletions docs/architecture-concepts/extensions-api.md
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ can be added the same way as you would in Laravel, and are thus not part of our
See the [Laravel package development guide](https://laravel.com/docs/10.x/packages) for more.


## Creating your Extension class
## Creating Your Extension Class

The entry-point for your extension is your Extensions class. Within this, you can register the custom page classes.
If needed, you can also register discovery handlers which can run custom logic at various parts of the boot process.
@@ -114,7 +114,7 @@ Since the discovery steps are handled sequentially, the added pages will automat
us having to implement that handler method. As we inject the page objects directly, we bypass the need for the `FileCollection`.


## Registering your extension
## Registering Your Extension

Now that we have our extension class, we need to register it with HydePHP.

2 changes: 1 addition & 1 deletion docs/architecture-concepts/page-models.md
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ for your pages, also house instructions to Hyde on how to parse, process, and re
In this article, you'll get a high-level overview of the page models, and some code examples to give you a look inside.


## The short version
## The Short Version

#### Page models are classes that have two primary concerns:

4 changes: 2 additions & 2 deletions docs/architecture-concepts/the-hydekernel.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ The kernel is created very early on in the application lifecycle, in the `bootst
as a singleton into the application service container.


## Accessing the kernel
## Accessing the Kernel

The HydeKernel is stored as a singleton in a static property in its own class and can be accessed in a few ways.

@@ -44,7 +44,7 @@ hyde()->version();
The Kernel instance is constructed in `bootstrap.php`, and is available globally as `$hyde`.


## The kernel lifecycle
## The Kernel Lifecycle

Whenever we talk about the kernel being "booted" we are talking about the kernel's role in the autodiscovery process.

6 changes: 3 additions & 3 deletions docs/creating-content/blog-posts.md
Original file line number Diff line number Diff line change
@@ -66,15 +66,15 @@ author: Mr. Hyde
date: 2022-05-09 18:38
---

## Write your Markdown here
## Write Your Markdown Here

Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Autem aliquid alias explicabo consequatur similique,
animi distinctio earum ducimus minus, magnam.
```


## Supported Front Matter properties
## Supported Front Matter Properties

### Post Front Matter Schema

@@ -202,7 +202,7 @@ image:
{ .info }


## Using images in posts
## Using Images in Posts

To use images stored in the `_media/` directory, you can use the following syntax:

4 changes: 2 additions & 2 deletions docs/creating-content/compile-and-deploy.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ navigation:

# Compile and Deploy your site

## Running the build command
## Running the Build Command

Now that you have some amazing content, you'll want to compile your site into static HTML.

@@ -41,7 +41,7 @@ php hyde serve
---


## Deploying your site
## Deploying Your Site

One of the things that make static sites so enjoyable to work with is how easy it is to deploy them to the web.
This list is not exhaustive, but gives you a general idea of the most common ways to deploy your site.
8 changes: 4 additions & 4 deletions docs/creating-content/documentation-pages.md
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ navigation:
```


## Dynamic content generation
## Dynamic Content Generation

Hyde makes documentation pages easy to create by automatically generating dynamic content such as the sidebar and page title.
If you are not happy with the results you can customize them in the config or with front matter.
@@ -220,7 +220,7 @@ You can change this in the Docs configuration file. Tip: The header will link to
### Sidebar page order

To quickly arrange the order of items in the sidebar, you can reorder the page identifiers in the list and the links will be sorted in that order.
Link items without an entry here will have fall back to the default priority of 999, putting them last.
Link items without an entry here will fall back to the default priority of 999, putting them last.

```php
'sidebar_order' => [
@@ -278,7 +278,7 @@ If you set this to false, Hyde will match the directory structure of the source
```


## Search feature
## Search Feature

### Introduction

@@ -325,7 +325,7 @@ navigation menu items are hidden. The page will still be accessible as normal bu
The Realtime Compiler that powers the `php hyde serve` command will automatically generate a fresh search index each time the browser requests it.


## Automatic "Edit Page" button
## Automatic "Edit Page" Button

### Introduction

4 changes: 2 additions & 2 deletions docs/creating-content/managing-assets.md
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ The `_site` directory is intended to be excluded from version control, while the
version control. You are of course free to modify this behaviour by editing the `webpack.mix.js` file to change the output directory.


## How do I compile assets?
## How Do I Compile assets?

First, make sure that you have installed all the NodeJS dependencies using `npm install`.
Then run `npm run dev` to compile the assets. If you want to compile the assets for production, run `npm run prod`.
@@ -111,7 +111,7 @@ so the Play CDN styles match the ones created by Laravel Mix.
All in all, this allows you to tinker around with Tailwind without having to compile anything.


## Managing images
## Managing Images

As mentioned above, assets stored in the _media folder are automatically copied to the _site/media folder,
making it the recommended place to store images. You can then easily reference them in your Markdown files.
2 changes: 1 addition & 1 deletion docs/creating-content/static-pages.md
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ if you don't want to use the scaffolding command.
> however you still need to use the `blade.php` extension so Hyde can recognize it.


## When to use which?
## When to Use Which?

Markdown pages look great and work well for simple "about" pages and the like, but with Markdown we are still pretty limited.

10 changes: 5 additions & 5 deletions docs/digging-deeper/advanced-customization.md
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ is registered, at which point the provider will search for any overrides in the
trait to use the same registration logic as the `HydeServiceProvider`.


## Customizing source directories
## Customizing Source Directories

The directories you place your content in are important. The directory will be used to determine the proper page type and the templates used.
If you are not happy the with defaults, you can change them. Note that these are relative to the `source_root` setting,
@@ -71,7 +71,7 @@ public function register(): void
```


## Customizing output directories
## Customizing Output Directories

Like source directories, the output directories are also important as they determine the output path for the compiled pages.
>warning Note that changing output directories also affects the route keys, as those are based on the output directory. <p>Scroll down to see the [Route key impact](#route-key-impact) section for more information.</p>
@@ -117,7 +117,7 @@ this may break your site's configuration and links, so you should always verify
You can learn more about this in the [route key documentation](core-concepts#paths-identifiers-and-route-keys).


## Custom source root
## Custom Source Root

HydePHP will by default look for the source directories shown above in the root of your project.
If you're not happy with this, it's easy to change! For example, you might want everything in a `'src'` subdirectory.
@@ -142,7 +142,7 @@ When run, Hyde will update the source directory setting in the config file, then
and move all source directories and their content into it.


## Custom media directory
## Custom Media Directory

The media directory houses assets like images and stylesheets. The default directory is `_media`, and upon building the site,
Hyde will copy all files in this directory to `_site/media` (or whatever your configured output and media directories are).
@@ -166,7 +166,7 @@ all files from `assets` will be copied to `_site/assets`. If the setting starts
from the output directory, so files in `_assets` will be copied to `_site/assets`.


## Custom output directory
## Custom Output Directory

>danger <p><strong>Warning: Hyde deletes all files in the output directory before compiling the site.</strong></p> <p>Don't set this path to a directory that contains important files!</p>
Loading

0 comments on commit d764907

Please sign in to comment.