user14429451
user14429451

Reputation: 53

Make served Jekyll project accessible within local network

I'm creating a website locally with Jekyll from my desktop Linux. It's connected to the same router as my other devices, I would like to test the site directly from my android but it's inaccessible.

I also tried to serve the _site directory with darkhttpd and it works, I can access it from android. Is there a way to do that with only Jekyll?

Upvotes: 0

Views: 444

Answers (1)

Bailey S
Bailey S

Reputation: 627

You can do this by starting the server with this:

bundle exec jekyll serve --host 0.0.0.0

You can then access the site locally by going to the servers IP and port 4000. It might look similar to this:

http://192.168.1.100:4000

Source: https://zarino.co.uk/post/jekyll-local-network/

Upvotes: 1

Related Questions