RegistersFileLocations
This trait registers the file paths for important Hyde locations.
If you want to customize these directories, the recommended way is to create a service provider that uses this trait, and change your paths in the register method, like in the HydeServiceProvider.
Remember that your overriding provider should be loaded after the HSP.
Table of Contents
Methods
- discoverBladeViewsIn() : void
- If you are loading Blade views from a different directory, you need to add the path to the view.php config. This is here done automatically when registering the provider.
- getOutputDirectoryConfiguration() : string
- getSourceDirectoryConfiguration() : string
- registerOutputDirectories() : void
- Register the optional output directories.
- registerSourceDirectories() : void
- Register the default source directories for the given page classes.
- storeCompiledSiteIn() : void
- useMediaDirectory() : void
- getPageConfiguration() : string
Methods
discoverBladeViewsIn()
If you are loading Blade views from a different directory, you need to add the path to the view.php config. This is here done automatically when registering the provider.
protected
discoverBladeViewsIn(string $directory) : void
Parameters
- $directory : string
getOutputDirectoryConfiguration()
protected
getOutputDirectoryConfiguration(string $class, string $default) : string
Parameters
- $class : string
- $default : string
Return values
stringgetSourceDirectoryConfiguration()
protected
getSourceDirectoryConfiguration(string $class, string $default) : string
Parameters
- $class : string
- $default : string
Return values
stringregisterOutputDirectories()
Register the optional output directories.
protected
registerOutputDirectories(array<HydePage>, string> $directoryMapping) : void
Some HTML pages, like Blade and Markdown pages are stored right in the _site/ directory. However, some pages, like docs and posts are in subdirectories of the _site/ directory. Location string should be relative to the root of the application.
Parameters
- $directoryMapping : array<HydePage>, string>
Tags
registerSourceDirectories()
Register the default source directories for the given page classes.
protected
registerSourceDirectories(array<HydePage>, string> $directoryMapping) : void
Location string should be relative to the source root, which is usually the root of the project.
Parameters
- $directoryMapping : array<HydePage>, string>
Tags
storeCompiledSiteIn()
protected
storeCompiledSiteIn(string $directory) : void
Parameters
- $directory : string
-
The relative path to the directory when the compiled site is stored.
Warning! This directory is emptied when compiling the site.
useMediaDirectory()
protected
useMediaDirectory(string $directory) : void
Parameters
- $directory : string
-
The relative path to the directory used for storing media files.
getPageConfiguration()
private
getPageConfiguration(string $option, string $class, string $default) : string
Parameters
- $option : string
- $class : string
- $default : string