From cb09f85a72b4ddedc509124634d6bf2923340f3c Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 8 Jul 2024 20:49:47 +0000 Subject: [PATCH 1/2] Merge pull request #1812 from hydephp/documentation-fixes Clean up the documentation https://github.com/hydephp/develop/commit/082457911e03c8d14716e48f2f470de4f07a6c84 --- .../base-markdown-page-methods.md | 5 -- .../hyde-pages-api/blade-page-methods.md | 3 -- .../documentation-page-methods.md | 7 --- .../hyde-pages-api/html-page-methods.md | 3 -- .../hyde-kernel-base-methods.md | 5 -- .../hyde-kernel-boot-methods.md | 4 -- .../hyde-kernel-extensions-methods.md | 6 --- .../hyde-kernel-filesystem-methods.md | 8 --- .../hyde-kernel-foundation-methods.md | 3 -- .../hyde-kernel-hyperlink-methods.md | 7 --- .../hyde-kernel-kernel-methods.md | 11 ---- .../hyde-kernel-string-methods.md | 5 -- .../hyde-kernel-view-methods.md | 4 -- .../hyde-pages-api/hyde-page-methods.md | 34 ------------ .../hyde-pages-api/in-memory-page-methods.md | 8 --- .../interacts-with-front-matter-methods.md | 3 -- .../hyde-pages-api/markdown-post-methods.md | 2 - _docs/architecture-concepts/the-hydekernel.md | 52 ------------------- _docs/creating-content/blog-posts.md | 4 +- _docs/digging-deeper/customization.md | 15 +++--- _docs/digging-deeper/helpers.md | 2 - _docs/digging-deeper/updating-hyde.md | 6 +-- _docs/getting-started/console-commands.md | 17 ------ _docs/getting-started/quickstart.md | 1 - 24 files changed, 11 insertions(+), 204 deletions(-) diff --git a/_docs/_data/partials/hyde-pages-api/base-markdown-page-methods.md b/_docs/_data/partials/hyde-pages-api/base-markdown-page-methods.md index 1631648f..09812578 100644 --- a/_docs/_data/partials/hyde-pages-api/base-markdown-page-methods.md +++ b/_docs/_data/partials/hyde-pages-api/base-markdown-page-methods.md @@ -8,7 +8,6 @@ Create a new page instance. Static alias for the constructor. ```php -// torchlight! {"lineNumbers": false} BaseMarkdownPage::make(string $identifier, Hyde\Markdown\Models\FrontMatter|array $matter, Hyde\Markdown\Models\Markdown|string $markdown): static ``` @@ -17,7 +16,6 @@ BaseMarkdownPage::make(string $identifier, Hyde\Markdown\Models\FrontMatter|arra Construct a new page instance. ```php -// torchlight! {"lineNumbers": false} $page = new BaseMarkdownPage(string $identifier, Hyde\Markdown\Models\FrontMatter|array $matter, Hyde\Markdown\Models\Markdown|string $markdown): void ``` @@ -26,7 +24,6 @@ $page = new BaseMarkdownPage(string $identifier, Hyde\Markdown\Models\FrontMatte Return the document's Markdown object. ```php -// torchlight! {"lineNumbers": false} $page->markdown(): Hyde\Markdown\Models\Markdown ``` @@ -35,7 +32,6 @@ $page->markdown(): Hyde\Markdown\Models\Markdown Compile the page into static HTML. ```php -// torchlight! {"lineNumbers": false} $page->compile(): string // The compiled HTML for the page. ``` @@ -44,7 +40,6 @@ $page->compile(): string // The compiled HTML for the page. Save the Markdown page object to disk by compiling the front matter array to YAML and writing the body to the file. ```php -// torchlight! {"lineNumbers": false} $page->save(): $this ``` diff --git a/_docs/_data/partials/hyde-pages-api/blade-page-methods.md b/_docs/_data/partials/hyde-pages-api/blade-page-methods.md index 0ae44527..c4fc3d59 100644 --- a/_docs/_data/partials/hyde-pages-api/blade-page-methods.md +++ b/_docs/_data/partials/hyde-pages-api/blade-page-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} /** @param string $identifier The identifier, which also serves as the view key. */ $page = new BladePage(string $identifier, Hyde\Markdown\Models\FrontMatter|array $matter): void ``` @@ -18,7 +17,6 @@ $page = new BladePage(string $identifier, Hyde\Markdown\Models\FrontMatter|array Get the Blade template/view key for the page. ```php -// torchlight! {"lineNumbers": false} $page->getBladeView(): string ``` @@ -27,7 +25,6 @@ $page->getBladeView(): string Compile the page into static HTML. ```php -// torchlight! {"lineNumbers": false} $page->compile(): string // The compiled HTML for the page. ``` diff --git a/_docs/_data/partials/hyde-pages-api/documentation-page-methods.md b/_docs/_data/partials/hyde-pages-api/documentation-page-methods.md index 44bcb4c8..a22aa0bc 100644 --- a/_docs/_data/partials/hyde-pages-api/documentation-page-methods.md +++ b/_docs/_data/partials/hyde-pages-api/documentation-page-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} DocumentationPage::home(): Hyde\Support\Models\Route ``` @@ -17,7 +16,6 @@ DocumentationPage::home(): Hyde\Support\Models\Route No description provided. ```php -// torchlight! {"lineNumbers": false} DocumentationPage::homeRouteName(): string ``` @@ -26,7 +24,6 @@ DocumentationPage::homeRouteName(): string No description provided. ```php -// torchlight! {"lineNumbers": false} DocumentationPage::hasTableOfContents(): bool ``` @@ -35,7 +32,6 @@ DocumentationPage::hasTableOfContents(): bool No description provided. ```php -// torchlight! {"lineNumbers": false} $page->getOnlineSourcePath(): string|false ``` @@ -44,7 +40,6 @@ $page->getOnlineSourcePath(): string|false Generate Table of Contents as HTML from a Markdown document body. ```php -// torchlight! {"lineNumbers": false} $page->getTableOfContents(): string ``` @@ -55,7 +50,6 @@ Get the route key for the page. If flattened outputs are enabled, this will use the identifier basename so nested pages are flattened. ```php -// torchlight! {"lineNumbers": false} $page->getRouteKey(): string ``` @@ -66,7 +60,6 @@ Get the path where the compiled page will be saved. If flattened outputs are enabled, this will use the identifier basename so nested pages are flattened. ```php -// torchlight! {"lineNumbers": false} $page->getOutputPath(): string ``` diff --git a/_docs/_data/partials/hyde-pages-api/html-page-methods.md b/_docs/_data/partials/hyde-pages-api/html-page-methods.md index ba8a726f..e0e1a367 100644 --- a/_docs/_data/partials/hyde-pages-api/html-page-methods.md +++ b/_docs/_data/partials/hyde-pages-api/html-page-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} $page->contents(): string ``` @@ -17,7 +16,6 @@ $page->contents(): string No description provided. ```php -// torchlight! {"lineNumbers": false} $page->compile(): string ``` @@ -26,7 +24,6 @@ $page->compile(): string No description provided. ```php -// torchlight! {"lineNumbers": false} $page->getBladeView(): string ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-base-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-base-methods.md index ef2d6c09..96ca983f 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-base-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-base-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::version(): string ``` @@ -17,7 +16,6 @@ Hyde::version(): string No description provided. ```php -// torchlight! {"lineNumbers": false} $hyde = new HydeKernel(string $basePath): void ``` @@ -26,7 +24,6 @@ $hyde = new HydeKernel(string $basePath): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::features(): Hyde\Facades\Features ``` @@ -35,7 +32,6 @@ Hyde::features(): Hyde\Facades\Features No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::hasFeature(Hyde\Enums\Feature $feature): bool ``` @@ -44,7 +40,6 @@ Hyde::hasFeature(Hyde\Enums\Feature $feature): bool Get the instance as an array. ```php -// torchlight! {"lineNumbers": false} Hyde::toArray(): array ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-boot-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-boot-methods.md index 4d9f327b..295aa773 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-boot-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-boot-methods.md @@ -8,7 +8,6 @@ Determine if the Kernel has booted. ```php -// torchlight! {"lineNumbers": false} Hyde::isBooted(): bool ``` @@ -17,7 +16,6 @@ Hyde::isBooted(): bool Boot the Hyde Kernel and run the Auto-Discovery Process. ```php -// torchlight! {"lineNumbers": false} Hyde::boot(): void ``` @@ -28,7 +26,6 @@ Register a new boot listener. Your callback will be called before the kernel is booted. You can use this to register your own routes, pages, etc. The kernel instance will be passed to your callback. ```php -// torchlight! {"lineNumbers": false} /** @param callable(\Hyde\Foundation\HydeKernel): void $callback */ Hyde::booting(callable(\Hyde\Foundation\HydeKernel): void): void ``` @@ -40,7 +37,6 @@ Register a new "booted" listener. Your callback will be called after the kernel is booted. You can use this to run any logic after discovery has completed. The kernel instance will be passed to your callback. ```php -// torchlight! {"lineNumbers": false} /** @param callable(\Hyde\Foundation\HydeKernel): void $callback */ Hyde::booted(callable(\Hyde\Foundation\HydeKernel): void): void ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-extensions-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-extensions-methods.md index b6609ffa..4c12889d 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-extensions-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-extensions-methods.md @@ -10,7 +10,6 @@ Register a HydePHP extension within the HydeKernel. Typically, you would call this method in the register method of a service provider. If your package uses the standard Laravel (Composer) package discovery feature, the extension will automatically be enabled when the package is installed. ```php -// torchlight! {"lineNumbers": false} Hyde::registerExtension(class-string<\Hyde\Foundation\Concerns\HydeExtension> $extension): void ``` @@ -19,7 +18,6 @@ Hyde::registerExtension(class-string<\Hyde\Foundation\Concerns\HydeExtension& Get the singleton instance of the specified extension. ```php -// torchlight! {"lineNumbers": false} Hyde::getExtension(class-string<T> $extension): T ``` @@ -28,7 +26,6 @@ Hyde::getExtension(class-string<T> $extension): T Determine if the specified extension is registered. ```php -// torchlight! {"lineNumbers": false} Hyde::hasExtension(class-string<\Hyde\Foundation\Concerns\HydeExtension> $extension): bool ``` @@ -37,7 +34,6 @@ Hyde::hasExtension(class-string<\Hyde\Foundation\Concerns\HydeExtension> $ No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getExtensions(): array<\Hyde\Foundation\Concerns\HydeExtension> ``` @@ -46,7 +42,6 @@ Hyde::getExtensions(): array<\Hyde\Foundation\Concerns\HydeExtension> No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getRegisteredExtensions(): array> ``` @@ -55,7 +50,6 @@ Hyde::getRegisteredExtensions(): array> ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-filesystem-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-filesystem-methods.md index efb79a5e..bdbe12dd 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-filesystem-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-filesystem-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::filesystem(): Hyde\Foundation\Kernel\Filesystem ``` @@ -17,7 +16,6 @@ Hyde::filesystem(): Hyde\Foundation\Kernel\Filesystem No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::path(string $path): string ``` @@ -26,7 +24,6 @@ Hyde::path(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::vendorPath(string $path, string $package): string ``` @@ -35,7 +32,6 @@ Hyde::vendorPath(string $path, string $package): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::mediaPath(string $path): string ``` @@ -44,7 +40,6 @@ Hyde::mediaPath(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::sitePath(string $path): string ``` @@ -53,7 +48,6 @@ Hyde::sitePath(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::siteMediaPath(string $path): string ``` @@ -62,7 +56,6 @@ Hyde::siteMediaPath(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::pathToAbsolute(array|string $path): array|string ``` @@ -71,7 +64,6 @@ Hyde::pathToAbsolute(array|string $path): array|string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::pathToRelative(string $path): string ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-foundation-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-foundation-methods.md index a94f2588..b328574b 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-foundation-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-foundation-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::files(): \Hyde\Foundation\Kernel\FileCollection ``` @@ -17,7 +16,6 @@ Hyde::files(): \Hyde\Foundation\Kernel\FileCollection ``` @@ -26,7 +24,6 @@ Hyde::pages(): \Hyde\Foundation\Kernel\PageCollection ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-hyperlink-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-hyperlink-methods.md index 78b062b0..1dceb9c5 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-hyperlink-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-hyperlink-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::formatLink(string $destination): string ``` @@ -17,7 +16,6 @@ Hyde::formatLink(string $destination): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::relativeLink(string $destination): string ``` @@ -26,7 +24,6 @@ Hyde::relativeLink(string $destination): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::mediaLink(string $destination, bool $validate): string ``` @@ -35,7 +32,6 @@ Hyde::mediaLink(string $destination, bool $validate): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::asset(string $name, bool $preferQualifiedUrl): string ``` @@ -44,7 +40,6 @@ Hyde::asset(string $name, bool $preferQualifiedUrl): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::url(string $path): string ``` @@ -53,7 +48,6 @@ Hyde::url(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::route(string $key): Hyde\Support\Models\Route ``` @@ -62,7 +56,6 @@ Hyde::route(string $key): Hyde\Support\Models\Route No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::hasSiteUrl(): bool ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-kernel-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-kernel-methods.md index 318b2d84..641d7d70 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-kernel-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-kernel-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getInstance(): Hyde\Foundation\HydeKernel ``` @@ -17,7 +16,6 @@ Hyde::getInstance(): Hyde\Foundation\HydeKernel No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setInstance(Hyde\Foundation\HydeKernel $instance): void ``` @@ -26,7 +24,6 @@ Hyde::setInstance(Hyde\Foundation\HydeKernel $instance): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getBasePath(): string ``` @@ -35,7 +32,6 @@ Hyde::getBasePath(): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setBasePath(string $basePath): void ``` @@ -44,7 +40,6 @@ Hyde::setBasePath(string $basePath): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getSourceRoot(): string ``` @@ -53,7 +48,6 @@ Hyde::getSourceRoot(): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setSourceRoot(string $sourceRoot): void ``` @@ -62,7 +56,6 @@ Hyde::setSourceRoot(string $sourceRoot): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getOutputDirectory(): string ``` @@ -71,7 +64,6 @@ Hyde::getOutputDirectory(): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setOutputDirectory(string $outputDirectory): void ``` @@ -80,7 +72,6 @@ Hyde::setOutputDirectory(string $outputDirectory): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getMediaDirectory(): string ``` @@ -89,7 +80,6 @@ Hyde::getMediaDirectory(): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setMediaDirectory(string $mediaDirectory): void ``` @@ -98,7 +88,6 @@ Hyde::setMediaDirectory(string $mediaDirectory): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getMediaOutputDirectory(): string ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-string-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-string-methods.md index 320b6f4d..4659a1ed 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-string-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-string-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::makeTitle(string $value): string ``` @@ -17,7 +16,6 @@ Hyde::makeTitle(string $value): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::normalizeNewlines(string $string): string ``` @@ -26,7 +24,6 @@ Hyde::normalizeNewlines(string $string): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::stripNewlines(string $string): string ``` @@ -35,7 +32,6 @@ Hyde::stripNewlines(string $string): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::trimSlashes(string $string): string ``` @@ -44,7 +40,6 @@ Hyde::trimSlashes(string $string): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::markdown(string $text, bool $normalizeIndentation): Illuminate\Support\HtmlString ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-view-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-view-methods.md index 37aec075..64fda5ff 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-view-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-view-methods.md @@ -8,7 +8,6 @@ Share data for the page being rendered. ```php -// torchlight! {"lineNumbers": false} Hyde::shareViewData(Hyde\Pages\Concerns\HydePage $page): void ``` @@ -17,7 +16,6 @@ Hyde::shareViewData(Hyde\Pages\Concerns\HydePage $page): void Get the route key for the page being rendered. ```php -// torchlight! {"lineNumbers": false} Hyde::currentRouteKey(): string ``` @@ -26,7 +24,6 @@ Hyde::currentRouteKey(): string Get the route for the page being rendered. ```php -// torchlight! {"lineNumbers": false} Hyde::currentRoute(): Hyde\Support\Models\Route ``` @@ -35,7 +32,6 @@ Hyde::currentRoute(): Hyde\Support\Models\Route Get the page being rendered. ```php -// torchlight! {"lineNumbers": false} Hyde::currentPage(): Hyde\Pages\Concerns\HydePage ``` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-page-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-page-methods.md index b4ca1e43..fe05afd4 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-page-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-page-methods.md @@ -8,7 +8,6 @@ Create a new page instance. Static alias for the constructor. ```php -// torchlight! {"lineNumbers": false} HydePage::make(string $identifier, Hyde\Markdown\Models\FrontMatter|array $matter): static ``` @@ -17,7 +16,6 @@ HydePage::make(string $identifier, Hyde\Markdown\Models\FrontMatter|array $matte Returns whether the page type is discoverable through auto-discovery. ```php -// torchlight! {"lineNumbers": false} HydePage::isDiscoverable(): bool ``` @@ -26,7 +24,6 @@ HydePage::isDiscoverable(): bool Get a page instance from the Kernel's page index by its identifier. ```php -// torchlight! {"lineNumbers": false} HydePage::get(string $identifier): Hyde\Pages\Concerns\HydePage ``` @@ -37,7 +34,6 @@ HydePage::get(string $identifier): Hyde\Pages\Concerns\HydePage Parse a source file into a new page model instance. ```php -// torchlight! {"lineNumbers": false} /** @param string $identifier The identifier of the page to parse. */ HydePage::parse(string $identifier): static // New page model instance for the parsed source file. ``` @@ -51,7 +47,6 @@ Get an array of all the source file identifiers for the model. Note that the values do not include the source directory or file extension. ```php -// torchlight! {"lineNumbers": false} HydePage::files(): array ``` @@ -60,7 +55,6 @@ HydePage::files(): array Get a collection of all pages, parsed into page models. ```php -// torchlight! {"lineNumbers": false} HydePage::all(): \Hyde\Foundation\Kernel\PageCollection ``` @@ -69,7 +63,6 @@ HydePage::all(): \Hyde\Foundation\Kernel\PageCollection Get the directory where source files are stored for the page type. ```php -// torchlight! {"lineNumbers": false} HydePage::sourceDirectory(): string ``` @@ -78,7 +71,6 @@ HydePage::sourceDirectory(): string Get the output subdirectory to store compiled HTML files for the page type. ```php -// torchlight! {"lineNumbers": false} HydePage::outputDirectory(): string ``` @@ -87,7 +79,6 @@ HydePage::outputDirectory(): string Get the file extension of the source files for the page type. ```php -// torchlight! {"lineNumbers": false} HydePage::fileExtension(): string ``` @@ -96,7 +87,6 @@ HydePage::fileExtension(): string Set the output directory for the page type. ```php -// torchlight! {"lineNumbers": false} HydePage::setSourceDirectory(string $sourceDirectory): void ``` @@ -105,7 +95,6 @@ HydePage::setSourceDirectory(string $sourceDirectory): void Set the source directory for the page type. ```php -// torchlight! {"lineNumbers": false} HydePage::setOutputDirectory(string $outputDirectory): void ``` @@ -114,7 +103,6 @@ HydePage::setOutputDirectory(string $outputDirectory): void Set the file extension for the page type. ```php -// torchlight! {"lineNumbers": false} HydePage::setFileExtension(string $fileExtension): void ``` @@ -123,7 +111,6 @@ HydePage::setFileExtension(string $fileExtension): void Qualify a page identifier into file path to the source file, relative to the project root. ```php -// torchlight! {"lineNumbers": false} HydePage::sourcePath(string $identifier): string ``` @@ -132,7 +119,6 @@ HydePage::sourcePath(string $identifier): string Qualify a page identifier into a target output file path, relative to the _site output directory. ```php -// torchlight! {"lineNumbers": false} HydePage::outputPath(string $identifier): string ``` @@ -141,7 +127,6 @@ HydePage::outputPath(string $identifier): string Get an absolute file path to the page's source directory, or a file within it. ```php -// torchlight! {"lineNumbers": false} HydePage::path(string $path): string ``` @@ -150,7 +135,6 @@ HydePage::path(string $path): string Format a filename to an identifier for a given model. Unlike the basename function, any nested paths within the source directory are retained in order to satisfy the page identifier definition. ```php -// torchlight! {"lineNumbers": false} /** @param string $path Example: index.blade.php */ HydePage::pathToIdentifier(string $path): string // Example: index ``` @@ -162,7 +146,6 @@ Get the route key base for the page model. This is the same value as the output directory. ```php -// torchlight! {"lineNumbers": false} HydePage::baseRouteKey(): string ``` @@ -171,7 +154,6 @@ HydePage::baseRouteKey(): string Construct a new page instance. ```php -// torchlight! {"lineNumbers": false} $page = new HydePage(string $identifier, Hyde\Markdown\Models\FrontMatter|array $matter): void ``` @@ -180,7 +162,6 @@ $page = new HydePage(string $identifier, Hyde\Markdown\Models\FrontMatter|array Compile the page into static HTML. ```php -// torchlight! {"lineNumbers": false} $page->compile(): string // The compiled HTML for the page. ``` @@ -189,7 +170,6 @@ $page->compile(): string // The compiled HTML for the page. Get the instance as an array. ```php -// torchlight! {"lineNumbers": false} $page->toArray(): array ``` @@ -198,7 +178,6 @@ $page->toArray(): array Get the path to the instance source file, relative to the project root. ```php -// torchlight! {"lineNumbers": false} $page->getSourcePath(): string ``` @@ -207,7 +186,6 @@ $page->getSourcePath(): string Get the path where the compiled page will be saved. ```php -// torchlight! {"lineNumbers": false} $page->getOutputPath(): string // Path relative to the site output directory. ``` @@ -220,7 +198,6 @@ The route key is the page URL path, relative to the site root, but without any f Route keys are used to identify page routes, similar to how named routes work in Laravel, only that here the name is not just arbitrary, but also defines the output location, as the route key is used to determine the output path which is `$routeKey.html`. ```php -// torchlight! {"lineNumbers": false} $page->getRouteKey(): string ``` @@ -229,7 +206,6 @@ $page->getRouteKey(): string Get the route object for the page. ```php -// torchlight! {"lineNumbers": false} $page->getRoute(): Hyde\Support\Models\Route ``` @@ -240,7 +216,6 @@ Format the page instance to a URL path, with support for pretty URLs if enabled. Note that the link is always relative to site root, and does not contain `../` segments. ```php -// torchlight! {"lineNumbers": false} $page->getLink(): string ``` @@ -253,7 +228,6 @@ The identifier is the part between the source directory and the file extension. For example, the identifier of a source file stored as '_pages/about/contact.md' would be 'about/contact', and 'pages/about.md' would simply be 'about'. ```php -// torchlight! {"lineNumbers": false} $page->getIdentifier(): string ``` @@ -262,7 +236,6 @@ $page->getIdentifier(): string Get the Blade template/view key for the page. ```php -// torchlight! {"lineNumbers": false} $page->getBladeView(): string ``` @@ -271,7 +244,6 @@ $page->getBladeView(): string Get the page title to display in HTML tags like `` and `<meta>` tags. ```php -// torchlight! {"lineNumbers": false} $page->title(): string ``` @@ -280,7 +252,6 @@ $page->title(): string Get the generated metadata for the page. ```php -// torchlight! {"lineNumbers": false} $page->metadata(): Hyde\Framework\Features\Metadata\PageMetadataBag ``` @@ -289,7 +260,6 @@ $page->metadata(): Hyde\Framework\Features\Metadata\PageMetadataBag Can the page be shown in the navigation menu? ```php -// torchlight! {"lineNumbers": false} $page->showInNavigation(): bool ``` @@ -298,7 +268,6 @@ $page->showInNavigation(): bool Get the priority of the page in the navigation menu. ```php -// torchlight! {"lineNumbers": false} $page->navigationMenuPriority(): int ``` @@ -307,7 +276,6 @@ $page->navigationMenuPriority(): int Get the label of the page in the navigation menu. ```php -// torchlight! {"lineNumbers": false} $page->navigationMenuLabel(): string ``` @@ -316,7 +284,6 @@ $page->navigationMenuLabel(): string Get the group of the page in the navigation menu, if any. ```php -// torchlight! {"lineNumbers": false} $page->navigationMenuGroup(): string ``` @@ -325,7 +292,6 @@ $page->navigationMenuGroup(): string No description provided. ```php -// torchlight! {"lineNumbers": false} $page->getCanonicalUrl(): string ``` diff --git a/_docs/_data/partials/hyde-pages-api/in-memory-page-methods.md b/_docs/_data/partials/hyde-pages-api/in-memory-page-methods.md index b14f9311..9dc6fc1b 100644 --- a/_docs/_data/partials/hyde-pages-api/in-memory-page-methods.md +++ b/_docs/_data/partials/hyde-pages-api/in-memory-page-methods.md @@ -8,7 +8,6 @@ Static alias for the constructor. ```php -// torchlight! {"lineNumbers": false} InMemoryPage::make(string $identifier, Hyde\Markdown\Models\FrontMatter|array $matter, string $contents, string $view): static ``` @@ -26,7 +25,6 @@ If the identifier for an in-memory page is "foo/bar" the page will be ```php -// torchlight! {"lineNumbers": false} $page = new InMemoryPage(string $identifier, \Hyde\Markdown\Models\FrontMatter|array $matter, string $contents, string $view): void ``` @@ -35,7 +33,6 @@ $page = new InMemoryPage(string $identifier, \Hyde\Markdown\Models\FrontMatter|a Get the contents of the page. This will be saved as-is to the output file when this strategy is used. ```php -// torchlight! {"lineNumbers": false} $page->getContents(): string ``` @@ -44,7 +41,6 @@ $page->getContents(): string Get the view key or Blade file for the view to use to render the page contents when this strategy is used. ```php -// torchlight! {"lineNumbers": false} $page->getBladeView(): string ``` @@ -55,7 +51,6 @@ Get the contents that will be saved to disk for this page. In order to make your virtual page easy to use we provide a few options for how the page can be compiled. If you want even more control, you can register a macro with the name 'compile' to overload the method, or simply extend the class and override the method yourself, either in a standard or anonymous class. ```php -// torchlight! {"lineNumbers": false} $page->compile(): string ``` @@ -66,7 +61,6 @@ Register a macro for the instance. Unlike most macros you might be used to, these are not static, meaning they belong to the instance. If you have the need for a macro to be used for multiple pages, you should create a custom page class instead. ```php -// torchlight! {"lineNumbers": false} $page->macro(string $name, callable $macro): void ``` @@ -75,7 +69,6 @@ $page->macro(string $name, callable $macro): void Determine if a macro with the given name is registered for the instance. ```php -// torchlight! {"lineNumbers": false} $page->hasMacro(string $method): bool ``` @@ -84,7 +77,6 @@ $page->hasMacro(string $method): bool Dynamically handle macro calls to the class. ```php -// torchlight! {"lineNumbers": false} $page->__call(string $method, array $parameters): mixed ``` diff --git a/_docs/_data/partials/hyde-pages-api/interacts-with-front-matter-methods.md b/_docs/_data/partials/hyde-pages-api/interacts-with-front-matter-methods.md index d7abf3ae..30195039 100644 --- a/_docs/_data/partials/hyde-pages-api/interacts-with-front-matter-methods.md +++ b/_docs/_data/partials/hyde-pages-api/interacts-with-front-matter-methods.md @@ -8,7 +8,6 @@ Get a value from the computed page data, or fallback to the page's front matter, then to the default value. ```php -// torchlight! {"lineNumbers": false} $page->data(string $key, mixed $default): \Hyde\Markdown\Models\FrontMatter|mixed ``` @@ -17,7 +16,6 @@ $page->data(string $key, mixed $default): \Hyde\Markdown\Models\FrontMatter|mixe Get the front matter object, or a value from within. ```php -// torchlight! {"lineNumbers": false} $page->matter(string $key, mixed $default): \Hyde\Markdown\Models\FrontMatter|mixed ``` @@ -26,7 +24,6 @@ $page->matter(string $key, mixed $default): \Hyde\Markdown\Models\FrontMatter|mi See if a value exists in the computed page data or the front matter. ```php -// torchlight! {"lineNumbers": false} $page->has(string $key): bool ``` diff --git a/_docs/_data/partials/hyde-pages-api/markdown-post-methods.md b/_docs/_data/partials/hyde-pages-api/markdown-post-methods.md index a1e3be0f..7b1d67c3 100644 --- a/_docs/_data/partials/hyde-pages-api/markdown-post-methods.md +++ b/_docs/_data/partials/hyde-pages-api/markdown-post-methods.md @@ -8,7 +8,6 @@ No description provided. ```php -// torchlight! {"lineNumbers": false} MarkdownPost::getLatestPosts(): \Hyde\Foundation\Kernel\PageCollection<\Hyde\Pages\MarkdownPost> ``` @@ -17,7 +16,6 @@ MarkdownPost::getLatestPosts(): \Hyde\Foundation\Kernel\PageCollection<\Hyde\Pag No description provided. ```php -// torchlight! {"lineNumbers": false} $page->toArray(): array ``` diff --git a/_docs/architecture-concepts/the-hydekernel.md b/_docs/architecture-concepts/the-hydekernel.md index 1dcfa615..19e45ab1 100644 --- a/_docs/architecture-concepts/the-hydekernel.md +++ b/_docs/architecture-concepts/the-hydekernel.md @@ -66,7 +66,6 @@ But you could just as well chain the methods on the accessed kernel singleton in No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::version(): string ``` @@ -75,7 +74,6 @@ Hyde::version(): string No description provided. ```php -// torchlight! {"lineNumbers": false} $hyde = new HydeKernel(string $basePath): void ``` @@ -84,7 +82,6 @@ $hyde = new HydeKernel(string $basePath): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::features(): Hyde\Facades\Features ``` @@ -93,7 +90,6 @@ Hyde::features(): Hyde\Facades\Features No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::hasFeature(string $feature): bool ``` @@ -102,7 +98,6 @@ Hyde::hasFeature(string $feature): bool Get the instance as an array. ```php -// torchlight! {"lineNumbers": false} Hyde::toArray(): array<TKey, TValue> ``` @@ -120,7 +115,6 @@ Hyde::toArray(): array<TKey, TValue> No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::files(): \Hyde\Foundation\Kernel\FileCollection<string, \Hyde\Support\Filesystem\ProjectFile> ``` @@ -129,7 +123,6 @@ Hyde::files(): \Hyde\Foundation\Kernel\FileCollection<string, \Hyde\Support\File No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::pages(): \Hyde\Foundation\Kernel\PageCollection<string, \Hyde\Pages\Concerns\HydePage> ``` @@ -138,7 +131,6 @@ Hyde::pages(): \Hyde\Foundation\Kernel\PageCollection<string, \Hyde\Pages\Concer No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::routes(): \Hyde\Foundation\Kernel\RouteCollection<string, \Hyde\Support\Models\Route> ``` @@ -156,7 +148,6 @@ Hyde::routes(): \Hyde\Foundation\Kernel\RouteCollection<string, \Hyde\Support\Mo No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::makeTitle(string $value): string ``` @@ -165,7 +156,6 @@ Hyde::makeTitle(string $value): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::normalizeNewlines(string $string): string ``` @@ -174,7 +164,6 @@ Hyde::normalizeNewlines(string $string): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::stripNewlines(string $string): string ``` @@ -183,7 +172,6 @@ Hyde::stripNewlines(string $string): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::trimSlashes(string $string): string ``` @@ -192,7 +180,6 @@ Hyde::trimSlashes(string $string): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::markdown(string $text, bool $normalizeIndentation): Illuminate\Support\HtmlString ``` @@ -210,7 +197,6 @@ Hyde::markdown(string $text, bool $normalizeIndentation): Illuminate\Support\Htm No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::formatLink(string $destination): string ``` @@ -219,7 +205,6 @@ Hyde::formatLink(string $destination): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::relativeLink(string $destination): string ``` @@ -228,7 +213,6 @@ Hyde::relativeLink(string $destination): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::mediaLink(string $destination, bool $validate): string ``` @@ -237,7 +221,6 @@ Hyde::mediaLink(string $destination, bool $validate): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::asset(string $name, bool $preferQualifiedUrl): string ``` @@ -246,7 +229,6 @@ Hyde::asset(string $name, bool $preferQualifiedUrl): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::url(string $path): string ``` @@ -255,7 +237,6 @@ Hyde::url(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::hasSiteUrl(): bool ``` @@ -273,7 +254,6 @@ Hyde::hasSiteUrl(): bool No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::filesystem(): Hyde\Foundation\Kernel\Filesystem ``` @@ -282,7 +262,6 @@ Hyde::filesystem(): Hyde\Foundation\Kernel\Filesystem No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::path(string $path): string ``` @@ -291,7 +270,6 @@ Hyde::path(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::vendorPath(string $path, string $package): string ``` @@ -300,7 +278,6 @@ Hyde::vendorPath(string $path, string $package): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::mediaPath(string $path): string ``` @@ -309,7 +286,6 @@ Hyde::mediaPath(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::sitePath(string $path): string ``` @@ -318,7 +294,6 @@ Hyde::sitePath(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::siteMediaPath(string $path): string ``` @@ -327,7 +302,6 @@ Hyde::siteMediaPath(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::pathToAbsolute(array|string $path): array|string ``` @@ -336,7 +310,6 @@ Hyde::pathToAbsolute(array|string $path): array|string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::pathToRelative(string $path): string ``` @@ -354,7 +327,6 @@ Hyde::pathToRelative(string $path): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getInstance(): Hyde\Foundation\HydeKernel ``` @@ -363,7 +335,6 @@ Hyde::getInstance(): Hyde\Foundation\HydeKernel No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setInstance(Hyde\Foundation\HydeKernel $instance): void ``` @@ -372,7 +343,6 @@ Hyde::setInstance(Hyde\Foundation\HydeKernel $instance): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getBasePath(): string ``` @@ -381,7 +351,6 @@ Hyde::getBasePath(): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setBasePath(string $basePath): void ``` @@ -390,7 +359,6 @@ Hyde::setBasePath(string $basePath): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getSourceRoot(): string ``` @@ -399,7 +367,6 @@ Hyde::getSourceRoot(): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setSourceRoot(string $sourceRoot): void ``` @@ -408,7 +375,6 @@ Hyde::setSourceRoot(string $sourceRoot): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getOutputDirectory(): string ``` @@ -417,7 +383,6 @@ Hyde::getOutputDirectory(): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setOutputDirectory(string $outputDirectory): void ``` @@ -426,7 +391,6 @@ Hyde::setOutputDirectory(string $outputDirectory): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getMediaDirectory(): string ``` @@ -435,7 +399,6 @@ Hyde::getMediaDirectory(): string No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::setMediaDirectory(string $mediaDirectory): void ``` @@ -444,7 +407,6 @@ Hyde::setMediaDirectory(string $mediaDirectory): void No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getMediaOutputDirectory(): string ``` @@ -464,7 +426,6 @@ Register a HydePHP extension within the HydeKernel. Typically, you would call this method in the register method of a service provider. If your package uses the standard Laravel (Composer) package discovery feature, the extension will automatically be enabled when the package is installed. ```php -// torchlight! {"lineNumbers": false} Hyde::registerExtension(class-string<\Hyde\Foundation\Concerns\HydeExtension> $extension): void ``` @@ -473,7 +434,6 @@ Hyde::registerExtension(class-string<\Hyde\Foundation\Concerns\HydeExtension& Get the singleton instance of the specified extension. ```php -// torchlight! {"lineNumbers": false} Hyde::getExtension(class-string<T> $extension): T ``` @@ -482,7 +442,6 @@ Hyde::getExtension(class-string<T> $extension): T Determine if the specified extension is registered. ```php -// torchlight! {"lineNumbers": false} Hyde::hasExtension(class-string<\Hyde\Foundation\Concerns\HydeExtension> $extension): bool ``` @@ -491,7 +450,6 @@ Hyde::hasExtension(class-string<\Hyde\Foundation\Concerns\HydeExtension> $ No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getExtensions(): array<\Hyde\Foundation\Concerns\HydeExtension> ``` @@ -500,7 +458,6 @@ Hyde::getExtensions(): array<\Hyde\Foundation\Concerns\HydeExtension> No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getRegisteredExtensions(): array<class-string<\Hyde\Foundation\Concerns\HydeExtension>> ``` @@ -509,7 +466,6 @@ Hyde::getRegisteredExtensions(): array<class-string<\Hyde\Foundation\Concerns\Hy No description provided. ```php -// torchlight! {"lineNumbers": false} Hyde::getRegisteredPageClasses(): array<class-string<\Hyde\Pages\Concerns\HydePage>> ``` @@ -527,7 +483,6 @@ Hyde::getRegisteredPageClasses(): array<class-string<\Hyde\Pages\Concerns\HydePa Share data for the page being rendered. ```php -// torchlight! {"lineNumbers": false} Hyde::shareViewData(Hyde\Pages\Concerns\HydePage $page): void ``` @@ -536,7 +491,6 @@ Hyde::shareViewData(Hyde\Pages\Concerns\HydePage $page): void Get the route key for the page being rendered. ```php -// torchlight! {"lineNumbers": false} Hyde::currentRouteKey(): string ``` @@ -545,7 +499,6 @@ Hyde::currentRouteKey(): string Get the route for the page being rendered. ```php -// torchlight! {"lineNumbers": false} Hyde::currentRoute(): Hyde\Support\Models\Route ``` @@ -554,7 +507,6 @@ Hyde::currentRoute(): Hyde\Support\Models\Route Get the page being rendered. ```php -// torchlight! {"lineNumbers": false} Hyde::currentPage(): Hyde\Pages\Concerns\HydePage ``` @@ -572,7 +524,6 @@ Hyde::currentPage(): Hyde\Pages\Concerns\HydePage Determine if the Kernel has booted. ```php -// torchlight! {"lineNumbers": false} Hyde::isBooted(): bool ``` @@ -581,7 +532,6 @@ Hyde::isBooted(): bool Boot the Hyde Kernel and run the Auto-Discovery Process. ```php -// torchlight! {"lineNumbers": false} Hyde::boot(): void ``` @@ -592,7 +542,6 @@ Register a new boot listener. Your callback will be called before the kernel is booted. You can use this to register your own routes, pages, etc. The kernel instance will be passed to your callback. ```php -// torchlight! {"lineNumbers": false} /** @param callable(\Hyde\Foundation\HydeKernel): void $callback */ Hyde::booting(callable(\Hyde\Foundation\HydeKernel): void): void ``` @@ -604,7 +553,6 @@ Register a new "booted" listener. Your callback will be called after the kernel is booted. You can use this to run any logic after discovery has completed. The kernel instance will be passed to your callback. ```php -// torchlight! {"lineNumbers": false} /** @param callable(\Hyde\Foundation\HydeKernel): void $callback */ Hyde::booted(callable(\Hyde\Foundation\HydeKernel): void): void ``` diff --git a/_docs/creating-content/blog-posts.md b/_docs/creating-content/blog-posts.md index 70f4b454..cb3fa83b 100644 --- a/_docs/creating-content/blog-posts.md +++ b/_docs/creating-content/blog-posts.md @@ -131,8 +131,8 @@ date: "2022-01-01 12:00" ### Author -Specify a page author, either by a username for an author defined in the `authors` config, or by an arbitrary name, -or by an array of author data. See the [Post Author](#post-authors) section for more details. +Specify a page author, either by a username for an author defined in the [`authors` config](customization#authors), or by an arbitrary name, +or by an array of author data. #### Arbitrary name displayed "as is" diff --git a/_docs/digging-deeper/customization.md b/_docs/digging-deeper/customization.md index 899d411a..27e4ab49 100644 --- a/_docs/digging-deeper/customization.md +++ b/_docs/digging-deeper/customization.md @@ -120,23 +120,20 @@ Here are the default settings: ], ``` ->warning Note that this feature requires that a site `url` is set! +>warning Note that this feature requires that a `site_url` is set! ### Authors -Hyde has support for adding authors in front matter, for example to -automatically add a link to your website or social media profiles. -However, it's tedious to have to add those to each and every -post you make, and keeping them updated is even harder. +Hyde has support for adding authors in front matter, for example to automatically add a link to your website or social media profiles. +However, it's tedious to have to add those to each and every post you make, and keeping them updated is even harder. -You can predefine authors in the Hyde config. -When writing posts, just specify the username in the front matter, -and the rest of the data will be pulled from a matching entry. +Instead, you can predefine authors in the Hyde config. When writing posts, just specify the username in the front matter, +and the rest of the data will be pulled from a matching entry found in the configuration file. #### Example ```php -// torchlight! {"lineNumbers": false} +// filepath: config/hyde.php 'authors' => [ Author::create( username: 'mr_hyde', // Required username diff --git a/_docs/digging-deeper/helpers.md b/_docs/digging-deeper/helpers.md index d8b4bce0..515714b8 100644 --- a/_docs/digging-deeper/helpers.md +++ b/_docs/digging-deeper/helpers.md @@ -433,7 +433,6 @@ just apply these changes to that new view, but for this example I'm going to upd ```blade // filepath _pages/posts.blade.php -// torchlight! {"lineNumbers": false} <h1>Latest Posts</h1>{{-- [tl! remove] --}} <h1>{{ $page->matter('title') ?? $title }}</h1> {{-- [tl! add] --}} ``` @@ -442,7 +441,6 @@ to that new view, but for this example I'm going to update the `posts` view. ```blade // filepath _pages/posts.blade.php -// torchlight! {"lineNumbers": false} @php $paginator = new \Hyde\Support\Paginator( // [tl! remove] $paginator = $page->matter('paginator') ?? new \Hyde\Support\Paginator( // [tl! add] diff --git a/_docs/digging-deeper/updating-hyde.md b/_docs/digging-deeper/updating-hyde.md index 106c5b39..225d1018 100644 --- a/_docs/digging-deeper/updating-hyde.md +++ b/_docs/digging-deeper/updating-hyde.md @@ -40,8 +40,8 @@ Using Git is highly recommended as it allows you to easily roll back changes if ## Update to a major version -When updating to a major version, you should read the release notes and the upgrade guide for that version. -If you are updating multiple major versions at once, it's recommended to update one major version at a time, +When updating to a major version, you should read the release notes and the upgrade guide for that version. +If you are updating multiple major versions at once, it's recommended to update one major version at a time, following the upgrade guide for each version. After following the upgrade guide, you can follow the post-update instructions below. ## Updating to a minor or patch version @@ -52,7 +52,7 @@ Updating a minor or patch version is easy using Composer. Just run the following composer update hyde/* --with-dependencies ``` -Note that if you have hardcoded a version constraint in your `composer.json` file, you may need to update it manually. +Note that if you have hardcoded a version constraint in your `composer.json` file, you may need to update it manually. You can always refer to the `composer.json` file in the HydePHP repository if you need a reference. ## Alternate update methods diff --git a/_docs/getting-started/console-commands.md b/_docs/getting-started/console-commands.md index 66b6f945..0b0a6113 100644 --- a/_docs/getting-started/console-commands.md +++ b/_docs/getting-started/console-commands.md @@ -22,7 +22,6 @@ The HydeCLI exists at the root of your application as the `hyde` script and prov assist you while you build your site. To view a list of all available Hyde commands, you may use the list command: ```bash -// torchlight! {"lineNumbers": false} php hyde list ``` @@ -32,14 +31,12 @@ Every command also includes a "help" screen which displays and describes the com To view a help screen, precede the name of the command with `help`: ```bash -// torchlight! {"lineNumbers": false} php hyde help <command> ``` You can also always add `--help` to a command to show detailed usage information. ```bash -// torchlight! {"lineNumbers": false} php hyde <command> --help ``` @@ -72,7 +69,6 @@ Here is a quick reference of all the available commands. You can also run `php h <a name="build" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde build [--run-dev] [--run-prod] [--run-prettier] [--pretty-urls] [--no-api] ``` @@ -94,7 +90,6 @@ Build the static site <a name="rebuild" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde rebuild <path> ``` @@ -112,7 +107,6 @@ Run the static site builder for a single file <a name="serve" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde serve [--host [HOST]] [--port [PORT]] ``` @@ -131,7 +125,6 @@ Start the realtime compiler server. <a name="validate" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde validate ``` @@ -143,7 +136,6 @@ Run a series of tests to validate your setup and help you optimize your site. <a name="build-rss" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde build:rss ``` @@ -155,7 +147,6 @@ Generate the RSS feed <a name="build-search" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde build:search ``` @@ -167,7 +158,6 @@ Generate the `docs/search.json` file <a name="build-sitemap" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde build:sitemap ``` @@ -179,7 +169,6 @@ Generate the `sitemap.xml` file <a name="make-page" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde make:page [--type [TYPE]] [--blade] [--docs] [--force] [--] [<title>] ``` @@ -201,7 +190,6 @@ Scaffold a new Markdown, Blade, or documentation page file <a name="make-post" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde make:post [--force] [--] [<title>] ``` @@ -220,7 +208,6 @@ Scaffold a new Markdown blog post file <a name="publish-configs" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde publish:configs ``` @@ -232,7 +219,6 @@ Publish the default configuration files <a name="publish-homepage" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde publish:homepage [--force] [--] [<homepage>] ``` @@ -251,7 +237,6 @@ Publish one of the default homepages as `index.blade.php`. <a name="publish-views" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde publish:views [<category>] ``` @@ -269,7 +254,6 @@ Publish the hyde components for customization. Note that existing files will be <a name="route-list" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde route:list ``` @@ -281,7 +265,6 @@ Display all registered routes. <a name="vendor-publish" style="display: inline-block; position: absolute; margin-top: -5rem;"></a> ```bash -// torchlight! {"lineNumbers": false} php hyde vendor:publish [--existing] [--force] [--all] [--provider [PROVIDER]] [--tag [TAG]] ``` diff --git a/_docs/getting-started/quickstart.md b/_docs/getting-started/quickstart.md index 87e0ecf7..b2083000 100644 --- a/_docs/getting-started/quickstart.md +++ b/_docs/getting-started/quickstart.md @@ -11,7 +11,6 @@ navigation: The recommended method of installing Hyde is using Composer, which installs the required dependencies on a per-project basis. ```bash -// torchlight! {"lineNumbers": false} composer create-project hyde/hyde ``` From 0bbd05dcaeaeec88c9ae5f823e0091b1f0b502db Mon Sep 17 00:00:00 2001 From: github-actions <github-actions@github.com> Date: Mon, 8 Jul 2024 20:56:37 +0000 Subject: [PATCH 2/2] Merge pull request #1813 from hydephp/documentation-generator-fixes Internal: Add a linting feature to the documentation generator script https://github.com/hydephp/develop/commit/ebf45d80b9c79092523d54909e84fe9ff8018833 --- .../_data/partials/hyde-pages-api/hyde-kernel-base-methods.md | 4 ++-- _docs/_data/partials/hyde-pages-api/hyde-page-methods.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_docs/_data/partials/hyde-pages-api/hyde-kernel-base-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-kernel-base-methods.md index 96ca983f..290eea03 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-kernel-base-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-kernel-base-methods.md @@ -1,7 +1,7 @@ <section id="hyde-kernel-base-methods"> <!-- Start generated docs for Hyde\Foundation\HydeKernel --> -<!-- Generated by HydePHP DocGen script at 2023-03-11 11:09:45 in 2.53ms --> +<!-- Generated by HydePHP DocGen script at 2024-07-08 20:47:38 in 2.89ms --> #### `version()` @@ -32,7 +32,7 @@ Hyde::features(): Hyde\Facades\Features No description provided. ```php -Hyde::hasFeature(Hyde\Enums\Feature $feature): bool +Hyde::hasFeature(Hyde\Enums\Feature|string $feature): bool ``` #### `toArray()` diff --git a/_docs/_data/partials/hyde-pages-api/hyde-page-methods.md b/_docs/_data/partials/hyde-pages-api/hyde-page-methods.md index fe05afd4..8c4c9a1c 100644 --- a/_docs/_data/partials/hyde-pages-api/hyde-page-methods.md +++ b/_docs/_data/partials/hyde-pages-api/hyde-page-methods.md @@ -1,7 +1,7 @@ <section id="hyde-page-methods"> <!-- Start generated docs for Hyde\Pages\Concerns\HydePage --> -<!-- Generated by HydePHP DocGen script at 2023-03-10 16:18:02 in 3.30ms --> +<!-- Generated by HydePHP DocGen script at 2024-07-08 20:48:42 in 5.42ms --> #### `make()` @@ -24,7 +24,7 @@ HydePage::isDiscoverable(): bool Get a page instance from the Kernel's page index by its identifier. ```php -HydePage::get(string $identifier): Hyde\Pages\Concerns\HydePage +HydePage::get(string $identifier): static ``` - **Throws:** \Hyde\Framework\Exceptions\FileNotFoundException If the page does not exist.