From 4e70bf094127ed49fbf5e0662dde6794526e7345 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 5 Oct 2024 13:01:31 +0200 Subject: [PATCH 1/3] Add file markers --- docs/architecture-concepts/the-hydekernel.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/architecture-concepts/the-hydekernel.md b/docs/architecture-concepts/the-hydekernel.md index c9c9bf2577a..e7044b77ad5 100644 --- a/docs/architecture-concepts/the-hydekernel.md +++ b/docs/architecture-concepts/the-hydekernel.md @@ -53,6 +53,8 @@ You can read all about it in the [Autodiscovery Documentation](autodiscovery). Since the most common way to interact with the kernel is through the Hyde facade, we will use that for the examples. But you could just as well chain the methods on the accessed kernel singleton instance if you wanted. + +
@@ -557,3 +559,5 @@ Hyde::booted(callable(\Hyde\Foundation\HydeKernel): void): void
+ + From 09ca767aea9cf5f2e314c047afc16d2a2336ea52 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 5 Oct 2024 13:06:51 +0200 Subject: [PATCH 2/3] Update the HydeKernel page with the partials --- monorepo/scripts/docs/DocGen.php | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/monorepo/scripts/docs/DocGen.php b/monorepo/scripts/docs/DocGen.php index 6260fe52e95..dc8f09410a4 100644 --- a/monorepo/scripts/docs/DocGen.php +++ b/monorepo/scripts/docs/DocGen.php @@ -152,6 +152,45 @@ generate($options); } +// Update the HydeKernel page +(function (): void { + echo "\n\033[33mUpdating the HydeKernel page...\033[0m"; + + $pages = [ + 'hyde-kernel-base-methods', + 'hyde-kernel-foundation-methods', + 'hyde-kernel-string-methods', + 'hyde-kernel-hyperlink-methods', + 'hyde-kernel-filesystem-methods', + 'hyde-kernel-kernel-methods', + 'hyde-kernel-extensions-methods', + 'hyde-kernel-view-methods', + 'hyde-kernel-boot-methods', + ]; + + $page = 'docs/architecture-concepts/the-hydekernel.md'; + + // Replace everything between and + // With the concatenated content of the partials + + $startMarker = ''; + $endMarker = ''; + + $rootPath = realpath(__DIR__.'/../../../'); + + $content = ''; + foreach ($pages as $partial) { + $content .= trim(file_get_contents($rootPath.'/docs/_data/partials/hyde-pages-api/'.$partial.'.md'))."\n\n"; + } + + $file = file_get_contents($page); + $file = preg_replace('/.*/s', $startMarker."\n\n".$content.$endMarker, $file); + + file_put_contents($page, $file); + + echo " \033[37mDone!\033[0m\n"; +})(); + // Assemble end time in milliseconds $timeEnd = microtime(true); $time = number_format(($timeEnd - $timeStart) * 1000, 2); From 8a385e542623c167283231ad4b723f576cb8b159 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 5 Oct 2024 13:07:24 +0200 Subject: [PATCH 3/3] Rebuild documentation --- docs/architecture-concepts/the-hydekernel.md | 22 +++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/architecture-concepts/the-hydekernel.md b/docs/architecture-concepts/the-hydekernel.md index e7044b77ad5..9f470ed3835 100644 --- a/docs/architecture-concepts/the-hydekernel.md +++ b/docs/architecture-concepts/the-hydekernel.md @@ -58,7 +58,7 @@ But you could just as well chain the methods on the accessed kernel singleton in
- + #### `version()` @@ -89,7 +89,7 @@ Hyde::features(): Hyde\Facades\Features No description provided. ```php -Hyde::hasFeature(string $feature): bool +Hyde::hasFeature(Hyde\Enums\Feature|string $feature): bool ``` #### `toArray()` @@ -107,14 +107,14 @@ Hyde::toArray(): array
- + #### `files()` No description provided. ```php -Hyde::files(): \Hyde\Foundation\Kernel\FileCollection +Hyde::files(): Hyde\Foundation\Kernel\FileCollection ``` #### `pages()` @@ -122,7 +122,7 @@ Hyde::files(): \Hyde\Foundation\Kernel\FileCollection +Hyde::pages(): Hyde\Foundation\Kernel\PageCollection ``` #### `routes()` @@ -130,7 +130,7 @@ Hyde::pages(): \Hyde\Foundation\Kernel\PageCollection +Hyde::routes(): Hyde\Foundation\Kernel\RouteCollection ``` @@ -189,7 +189,7 @@ Hyde::markdown(string $text, bool $normalizeIndentation): Illuminate\Support\Htm