Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Jekyll plugin for building Jekyll sites with any local theme stored in a _themes directory.
Jekyll Local Theme is a Jekyll plugin for building Jekyll sites with any local theme, switching the source of theme files from a remote gem to a directory inside the site repository. It takes a local theme folder in the site's _themes directory and makes that theme's layouts, includes, and assets active in Jekyll's build pipeline after you set one line in _config.yml.
Jekyll Local Theme is a Jekyll plugin that changes the way Jekyll resolves the theme for a site. You provide a theme folder in a _themes directory, and the plugin loads that folder as the active theme, replacing the need for a theme gem. The plugin runs on Jekyll and is installed as a Ruby gem by adding gem "jekyll-local-theme" to your Gemfile and running bundle install. Its GitHub repository lists topics including jekyll-plugin, jekyll-themes, and github-pages.
_themes directory inside the project, so no remote gem or network fetch is needed at build time.git submodule add https://github.com/jekyll/minima.git _themes/minima.local_theme in _config.yml is enough to switch between different local themes._themes instead of using git submodule.plugins list in _config.yml, the normal Jekyll plugin mechanism.gem "jekyll-local-theme" in the Gemfile.local_theme at the theme folder and iterate.bundle update or changing gem sources.local_theme.local_theme value in _config.yml to change the entire site appearance.The README gives a four-step workflow. First, add gem "jekyll-local-theme" to the Gemfile and run bundle install. Second, add - jekyll-local-theme under the plugins key in _config.yml. Third, place a theme in the _themes directory — either through git submodule add or by copying files. Fourth, set local_theme to the theme's directory name, such as minima.
Pros — Installation is straightforward through Bundler; themes need no RubyGems packaging; switching between themes is a one-line config change; submodule support gives version pinning.
Cons — It only works with themes already present locally; it does not fetch themes from a remote registry; and it is limited to Jekyll sites, not other static-site generators.
Add gem "jekyll-local-theme" to your Gemfile, run bundle install, then add - jekyll-local-theme inside the plugins list in _config.yml. No other installation step is mentioned in the README.
No. The README explicitly says you can just copy files into the _themes directory without using git submodule. Submodules are an optional way to version control the theme source.
Yes, as long as the theme is a Jekyll theme with the standard theme structure. The README uses the official minima theme as an example and describes the plugin as working with any local theme placed in _themes.
Its GitHub repository lists github-pages as a topic, which suggests it was designed with GitHub Pages in mind. The README itself does not explicitly state GitHub Pages compatibility, so check the plugin's issue tracker for the current status.
local_theme need to be set to?The value is the directory name of the theme inside _themes. For example, if you added the theme to _themes/minima, set local_theme to minima in _config.yml.
