Jekyll服务器无法在移动浏览器中工作

时间:2015-01-21 16:49:45

标签: ruby mobile jekyll adobe-edge

我在尝试使用Jekyll查看Adobe edge inspector网站时收到错误消息。我在端口:4000使用内置的Jekyll开发服务器。此外,有问题的Jekyll网站没有出现在我的Safari移动浏览器中。

下载我如何启动服务器

jekyll serve --watch 

,这是输出

 Generating...                     done.
 Auto-regeneration: enabled for '/Users/auser/Sites/user.me/code'
 Configuration file: /Users/auser/Sites/user.me/code/_config.yml
 Server address: http://127.0.0.1:4000/
 Server running... press ctrl-c to stop.

如何在移动浏览器中使用它?

1 个答案:

答案 0 :(得分:4)

正如你在输出中所观察到的那样:(Server address: http://127.0.0.1:4000/),Jekyll只回答来自本地机器的请求。

要让Jekyll回答所有地址,请使用-H选项。来自jekyll serve --help

-H, --host [HOST]  Host to bind to

使用如下:

jekyll serve --watch -H 0.0.0.0