I was wondering if it is possible to run multiple jekyll app at the same time. I have installed foreman but it doesn't seem to be able to change the app port when an other one is already running.
At the moment I have to set the jekyll port manually in the Procfile
web: jekyll --server 5000
Is it in anyway possible to do this automatically?
I think I am a bit late, but here is the answer for those, who have the same problem.
Equally to Ruby on Rails the command --port 3000
can be used.
So it would look like this:
$ jekyll serve --port 8888
Edit: As mentioned in the documentation you can also simply add the option port: 8888
in your _config.yml
file.
name: Your New Jekyll Site
pygments: true
port: 8888
Port 8888 is used here for the example
These are just a few of the available configuration options. Many configuration options can either be specified as flags on the command line, or alternatively (and more commonly) they can be specified in a _config.yml file at the root of the source directory. Jekyll will automatically use the options from this file when run. For example, if you place the following lines in your
_config.yml
file:source: _source destination: _deploy
Then the following two commands will be equivalent:
$ jekyll build $ jekyll build --source _source --destination _deploy
So using the command line
jekyll serve --port 8888
is the equivalent to putting port: 8888
into your _config.yml.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With