Is it possible to serve multiple Jekyll sites locally?

前端 未结 6 1493
旧时难觅i
旧时难觅i 2021-02-18 13:01

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 si

6条回答
  •  面向向阳花
    2021-02-18 13:36

    Two ways:

    1. In your _config.yml file, specify a port other than 4000 like this, for example:
      port: 4001
      
    2. OR (my preferred choice), add --port 4001 to your jekyll serve command, like this, for example:
      bundle exec jekyll serve --livereload --port 4001
      

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

提交回复
热议问题