是否可以在本地服务多个Jekyll网站? [英] Is it possible to serve multiple Jekyll sites locally?

查看:40
本文介绍了是否可以在本地服务多个Jekyll网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我通过命令行为Jekyll网站提供服务时,都会在端口4000上提供服务.不能在同一端口上为两个网站提供服务.

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.

是否可以在本地服务多个Jekyll网站?

Is it possible to serve multiple Jekyll sites locally?

推荐答案

是的,可以通过使用本地服务器端口服务"命令为每个站点设置不同的端口号来在本地为多个Jekyll站点提供服务.

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.

请参见 https://jekyllrb.com/docs/configuration/options/#serve-command-options .

在站点的_config.yml文件中或通过命令行为站点提供服务时,设置除Jekyll的默认端口(4000)以外的端口号.

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.

这篇关于是否可以在本地服务多个Jekyll网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆