Search code examples
jekyll

Is it possible to serve multiple Jekyll sites locally?


Every time I serve a Jekyll site from the command line it is served on port 4000. Two sites can't be served on the same port.

Is it possible to serve multiple Jekyll sites locally?


Solution

  • Yes it is possible to serve multiple Jekyll sites locally by setting different port numbers for each site using the Local Server Port serve command option.

    See https://jekyllrb.com/docs/configuration/options/#serve-command-options.

    Set a port number other than Jekyll's default port (4000) in the site's _config.yml file or when serving the site via the command line.