Can I serve multiple Jekyll sites locally?

Each time I serve the Jekyll site from the command line, it is served on port 4000. Two nodes cannot be served on the same port.

Can I serve multiple Jekyll sites locally?

+5
source share
2 answers

Yes, you can serve multiple Jekyll sites locally by setting different port numbers for each site using the local server server command.

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

Set the port number different from the default Jekyll port (4000) in the site file _config.yml or when servicing the site through the command line.

+2
source

You can also start the server with the optional argument --port 1234 or --host hostname . For instance:

 $ jekyll serve --port 4001 --host my_hostname_or_ip 

You can view all possible CLI flags from the Jekyll Official Documentation

+7
source

Source: https://habr.com/ru/post/1201757/


All Articles