Themes
● Differs from Ruby Jekyll — modified
Themes are resolved from a local _theme/<name> folder, or via Bundler (bundle show) as a fallback — remote_theme is not supported, and theme _data, theme config, and theme.* variables are ignored.
Themes package up layouts, includes, and stylesheets in a way that can be
overridden by your site's content. Jigyll supports Jekyll's theme layout:
a theme contributes its _layouts, _includes, _sass, and assets
directories to your site's build.
Activate a theme with the theme key in _config.yml:
theme: minima
How Jigyll finds a theme
Differs from Jekyll. There is no gem installation step. Jigyll resolves the theme directory in two ways, in order:
- A local
_themefolder — if<source>/_theme/<theme-name>/exists, it is used. This is the Jigyll-native way to vendor a theme: copy (or submodule) the theme's files there.- Bundler fallback — otherwise, if
bundleis on yourPATH, Jigyll runsbundle show <theme-name>and uses the gem's directory. This lets an existing Jekyll project with aGemfilekeep working, but it does require a Ruby toolchain.If neither works, the build fails with an error. The
jekyll-remote-themeplugin (remote_theme:key) is not supported — vendor the theme into_theme/instead.
What a theme provides
Jigyll reads these directories from the theme, with your site's own files always taking precedence:
_layouts— a page'slayoutis looked up in your site's_layoutsfirst, then the theme's._includes—{% include %}searches your site's_includesfirst, then the theme's._sass— the theme's partials are on the Sass load path; a same-named partial in your site's_sasswins.assets— theme assets are output unless your site has a file at the same path.
Differs from Jekyll. A theme's
_datadirectory (Jekyll 4.3+) and a theme-bundled_config.yml(Jekyll 4.0+) are ignored, the theme's gemspecruntime_dependenciesare not auto-loaded as plugins (list the emulated plugins you need explicitly), and there are notheme.*Liquid variables.
Overriding theme defaults
To replace layouts or includes in your theme, make a copy in your
_layouts or _includes directory of the specific file you wish to
modify, or create the file from scratch giving it the same name as the file
you wish to override.
For example, if your selected theme has a page layout, you can override
the theme's layout by creating your own page layout in the _layouts
directory (that is, _layouts/page.html).
To modify a stylesheet, also copy the theme's main Sass file into the
_sass directory in your site's source. Your theme's styles can be
included in your stylesheet using the @import directive:
@import "{{ site.theme }}";
Creating themes
Jekyll's jekyll new-theme scaffolding and RubyGems publishing workflow
don't apply to Jigyll. A Jigyll theme is just a directory with _layouts,
_includes, _sass, and assets folders — anything that follows that
shape (including any existing Jekyll theme's source) can be dropped into
_theme/<name>/ and used directly.