Scroll to navigation

JEKYLL(1) User Commands JEKYLL(1)

NAME

jekyll - blog-aware, static site generator

USAGE

jekyll command [options...]

COMMANDS

docs
It requires the jekyll-docs plugin to be installed.
import
This command allows one to import blog content from various resources as markdown files into the Jekyll ./_post/ and ./_drafts/ structure. It requires the jekyll-import plugin to be installed.
new [PATH]
Creates a new Jekyll site scaffold in PATH.
b, build
Build the site from its sources and put the results into the destination directory.
s, serve, server
Serve the site locally.
doctor, hyde
Search site and print specific any deprecation or configuration issues.
clean
Remove the destination directory.
new-theme
Creates a new Jekyll theme scaffold
help [COMMAND]
Show the help message, optionally for a given subcommand.

Plugins like jekyll-compose can provide more commands then documented here.

OPTIONS

There are some general flags to control Jekyll's behavior:
-s, --source [DIR]
Source directory (defaults to ./). This can also be set in _config.yml via the source: option.
-d, --destination [DIR]
Destination directory (defaults to ./_site). This can also be set in _config.yml via the destination: option.
-p, --plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]
Plugins directory (defaults to ./_plugins).
--safe
Safe mode (defaults to false). This disables custom plugins, and ignores links. This can also be set in _config.yml via the safe: option.
--layouts DIR
Layouts directory (defaults to ./_layouts).
--profile
Generate a Liquid rendering profile.
-h, --help
Show the help output.
-v, --version
Print the name and version
-t, --trace
Show the full backtrace when an error occurs.

NEW OPTIONS

The following options control a new site's creation.
--blank
Create just the site scaffolding but with empty files.
--force
Force creation of the site even if the default or given destination PATH already exists.
--skip-bundle
Skip 'bundle install' which is run by default.

BUILD OPTIONS

The following options control the build command.
--config CONFIG_FILE[,CONFIG_FILE2,...]
Use one or more (custom) configuration files instead of or together with _config.yml. Settings specified in later files override earlier definitions.
-b, --baseurl URL
Serve the website from the given base URL.
-I, --incremental
Enable incremental rebuilds. Only generate documents and pages that were updated since the previous build. The file .jekyll-metadata keeps track of both file modification times and inter-document dependencies.
-w, --[no-]watch
Watch for changes and rebuild the changed sites from source. This
--limit_posts MAX_POSTS
Limit the number of posts to parse and publish.
--future
Publish posts or collection documents with a future date.
-D, --drafts
Process and render posts in the _drafts folder (defaults to no).
--unpublished
Render posts that are marked as unpublished (defaults to no).
--force_polling
Force watch to use polling.
--lsi
Use a Latent Semantic Indexer (LSI) like classifier-reborn for an improved related posts feature.
--strict_front_matter
Fail the build if errors are present in the front matter.
-q, --quiet
Silence output.
-V, --verbose
Print verbose output.

SERVE OPTIONS

Serving a site all options to the build command are supported together with these additional options.
-H, --host [HOST]
Local server hostname to listen to. The default is 127.0.0.1 or localhost.
-P, --port [PORT]
Local server port to bind to. The default is 4000.
--ssl-cert [CERT]
X.509 (SSL) certificate.
--ssl-key [KEY]
X.509 (SSL) private key.
-B, --detach
Run the server in the background.
--skip-initial-build
Skip initial site build which occurs before the server is started.
-o, --open-url
Launch the site in a browser.
--show-dir-listing
Show a directory listing instead of loading the index file.
-l, --livereload
Use LiveReload to automatically refresh the browser.
--livereload-ignore ignore GLOB1[,GLOB2[,...]]
Files for LiveReload to ignore. The values must be quoted so the shell won't expand them.
--livereload-min-delay [SECONDS]
Minimum reload delay.
--livereload-max-delay [SECONDS]
Maximum reload delay.
--livereload-port [PORT]
Port for LiveReload to listen on.

NEW THEME OPTIONS

The following options control the new-theme command.
-c, --code-of-conduct
Include a Code of Conduct (defaults to false).

FILES

_config.yml
The main configuration is done by default in the file _config.yml. This file can control both Jekyll's behavior (see OPTIONS) and site/theme configuration variables. If the configuration shall be split or a non-default file shall be used one can use the --config switch to define all configuration files.

See <https://jekyllrb.com/docs/configuration/options/> and <https://jekyllrb.com/docs/configuration/default/>.

ENVIRONMENT

JEKYLL_ENV
This environment variable defaults to development and can be checked during build via conditional statements to influence the output for example. It usually only affects the build and serve commands. The other well known value is production, but really any value can be assigned.

See <https://jekyllrb.com/docs/configuration/environments/>.

SEE ALSO

There is extensive documentation at <https://jekyllrb.com/docs/>.

AUTHOR

This manual page was originally written by Youhei SASAKI <uwabami@gfd-dennou.org>, for the Debian GNU/Linux system (but may be used by others). It was later updated by Daniel Leidert <dleidert@debian.org>

January 2020 Jekyll 3.8