Theme Engine
HydeJS enables you to utilize, scaffold, and import themes to keep your repository directories clean.
Installing Jekyll Themes
You can import any Jekyll theme library from Git and automatically convert it into a HydeJS-compatible package using:
hydejs install -t https://github.com/jekyll/minima.git
What this does:
- Clones the theme repository to a local
.hydejs-themes/cache directory. - Scaffolds a
package.jsonconversion config. - Configures an automated GitHub actions workflow for NPM publishing.
- Links the theme natively using local NPM link bindings:
npm install file:.hydejs-themes/minima - Updates your project’s
_config.ymlto specify the installed theme:theme: "@hydejs/theme-minima"
Scaffolding a New Theme
To create a new theme layout from scratch, run the command:
hydejs new-theme my-custom-theme
This generates a theme library skeleton under the jekyll-themes/ directory, including layouts, includes, assets folders, and an initialized package.json package file.
Theme Fallbacks
When compiling templates (such as includes or layouts), HydeJS searches in the following order:
- Local Project Directories: E.g.
_layouts/and_includes/inside your source root. These will always override theme defaults. - Installed NPM Theme Packages: Directories mapped inside the currently configured
themeNPM package. - Local Fallback Directory: Mapped under
jekyll-themes/.